The TWUGetErrorMessage function retrieves a descriptive error message for a given Win32 error code. This can be used to provide more information in the case of failure. If no description is available, a default string with the error code embedded in it is returned.
TCHAR * TWUGetErrorMessage(
URESULT uResult,
TCHAR *pszBuffer,
UINT uBufferSize
);
Delphi version:
function TWUGetErrorMessage(
_uResult: URESULT;
pszBuffer: PTCHAR;
uBufferSize: UINT
): PTCHAR;
The function returns a pointer to the end of the formatted error message, i.e., to the terminating 0 character.