INT GetErrorString( |
|
DWORD dwErrorCode, |
|
|
LPTSTR lpszDescription, |
|
|
INT cbDescription |
|
); |
INT GetErrorString( |
|
DWORD dwErrorCode, |
|
|
CString& strDescription |
|
); |
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 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. An alternate form of the method accepts a CString
variable which will contain the error description.
- cbDescription
- 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 zero,
meaning that no description exists for the specified error code.
Typically this indicates that the error code passed to the method is
invalid.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csmtpv11.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
GetLastError,
SetLastError,
ShowError
|