CDnsClient::GetErrorString
INT GetErrorString(
DWORD dwErrorCode,  
LPTSTR lpszDescription,  
INT nMaxLength  
);

The GetErrorString method is used to return a description of a specific error code. Typically this is used in conjunction with the GetLastError method for use with warning dialogs or as diagnostic messages.

Parameters

dwErrorCode
The last-error code for which a description is returned.
lpszDescription
A pointer to the buffer that will contain a description of the specified error code. This buffer should be at least 128 characters in length.
nMaxLength
The maximum number of characters that may be copied into the description buffer.

Return Value

If the method succeeds, the return value is the length of the description string. If the method fails, the return value is 0, meaning that no description exists for the specified error code. Typically this indicates that the error code passed to the method is invalid.

Requirements

Client: Requires Windows Vista, Windows XP or Windows 2000 Professional.
Server: Requires Windows Server 2008, Windows Server 2003 or Windows 2000 Server.
Header: Include cstools6.h.
Library: Use csdnsav6.lib.
Unicode: Implemented as Unicode and ANSI versions.

See Also

GetLastError, SetLastError, ShowError


Copyright © 2008 Catalyst Development Corporation. All rights reserved.