ICertRequest2::GetErrorMessageText method (certcli.h)

The GetErrorMessageText method retrieves the error message text for an HRESULT error code.

If the error message text is localized, it has been localized on the client.

Syntax

HRESULT GetErrorMessageText(
  [in]  LONG hrMessage,
  [in]  LONG Flags,
  [out] BSTR *pstrErrorMessageText
);

Parameters

[in] hrMessage

A value that represents an HRESULT error.

[in] Flags

A LONG value that corresponds to one of the values in the following table.

Value Meaning
Zero (0)
The error message text will not have the HRESULT hexadecimal and decimal values appended.
CR_GEMT_HRESULT_STRING
The error message text will have the HRESULT hexadecimal and decimal values appended.

[out] pstrErrorMessageText

A pointer to the BSTR that represents the error message text for hrMessage. When you have finished using the BSTR, free it by calling the SysFreeString function.

Return value

C++

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

The return value is a String that contains the error message text for hrMessage.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header certcli.h (include Certsrv.h)
Library Certidl.lib
DLL Certcli.dll