| |
| INT ShowError( |
| |
LPCTSTR lpszAppTitle, |
|
| |
UINT uType, |
|
| |
DWORD dwErrorCode |
|
| ); |
Display a message box which describes the specified error.
Parameters
- lpszAppTitle
- A null-terminated string which specifies the title
of the message box that is displayed. If this argument is NULL or
omitted, then the default title of "Error" will be
displayed.
- uType
- An unsigned integer which specifies the type of message box
that will be displayed. This is the same value that is used by the
MessageBox method in the Windows API. If a value of zero is
specified, then a message box with a single OK button will be
displayed. Refer to that method for a complete list of
options.
- dwErrorCode
- Specifies the error code that will be used when displaying the
message box. If this argument is zero, then the last error that
occurred in the current thread will be displayed.
Return Value
If the method is successful, the return value will be the return
value from the MessageBox function. If the method fails, it
will return a value of zero.
Remarks
The ShowError method will display a modal message box with
an error message that corresponds to the specified error code. All
top-level windows belonging to the current thread will be disabled
until the user responds to the message box. An application should only
invoke this method from within the main UI thread, never from within a
server event handler such as OnConnect.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cswsock12.h
Import Library: cswskv12.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
|
|