Click to return to the Web Content Management home page    
WpEnumProviders Function     WpListSites Function     Web Publishing Programmer...    
Web Workshop  |  Web Content Management

WpGetErrorString Function


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 NTUse version 4.0 and later
WindowsUse Windows 95 and later
HeaderDeclared in wpapi.h
Import LibraryLink with WebPost.lib
Minimum availabilityInternet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.