Provides a textual explanation of the specified error code.
Syntax
DWORD WpGetErrorString( UINT uErrCode, LPTSTR szOutputBuf, DWORD *pdwBuflen );
Parameters
- uErrCode
- Error code to translate.
- szOutputBuf
- Error message as NULL-terminated string. If NULL or not large enough, use the value returned in pdwBufLen to allocate the necessary buffer.
- pdwBufLen
- On entry, the size of buffer provided. On return, the required buffer size in bytes.
Return Value
Returns NO_ERROR if successful, or an E_FAIL error code otherwise.
Remarks
The error code is first looked up in Web Publishing's error message table, then in the Win32® system table. If the error code cannot be translated, the function returns E_FAIL and the buffer is filled with an "Unknown Error" message.
Example
The following example shows how to call WpGetErrorString to obtain an explanation for a specified error code.
{ HRESULT hResult = NOERROR; DWORD BufLen; hResult = WpGetErrorString(0, NULL, &BufLen); }
Function Information
Windows NT Use version 4.0 and later Windows Use Windows 95 and later Header Declared in wpapi.h Import Library Link with WebPost.lib Minimum availability Internet Explorer 4.0