IpcGetErrorMessageText function

Returns the error message text associated with a supplied error code. This function can translate both Windows errors and errors returned by another Rights Management Services SDK 2.1 function.

Syntax

HRESULT WINAPI IpcGetErrorMessageText(
        HRESULT hrError,
        DWORD   dwLanguageId,
  _Out_ LPCWSTR *ppwszErrorMessageText
);

Parameters

hrError

The error code to translate.

dwLanguageId

The language identifier for the requested message. If zero, the function searches for LANGIDs in the order specified by FormatMessage.

ppwszErrorMessageText [out]

A pointer to a variable that receives a NULL-terminated string that contains the translated error text. This buffer is allocated by the RMS Client 2.1 and must be freed by calling IpcFreeMemory.

Return value

If the function succeeds, the return value is S_OK. If the function fails, it returns an HRESULT value that indicates the error.

For more information, see Error codes for a description of all RMS SDK 2.1 return values.

Requirements

Minimum supported client
Windows Vista with SP2
Minimum supported server
Windows Server 2008
Header
Ipcbase.h (include Msipc.h)
Library
Msipc.lib
DLL
Msipc.dll

See also

FormatMessage

IpcFreeMemory

Error codes