WinSetErrorInfo: Difference between revisions
Appearance
Created page with "WinSetErrorInfo posts an error message, which can be retrieved by an application that calls WinGetLastError. == Syntax == WinSetErrorInfo(idError, fsOptions, arg1...argN);..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
WinSetErrorInfo posts an error message, which can be retrieved by an application that calls WinGetLastError. | WinSetErrorInfo posts an error message, which can be retrieved by an application that calls [[WinGetLastError]]. | ||
== Syntax == | == Syntax == | ||
WinSetErrorInfo(idError, fsOptions, arg1...argN) | WinSetErrorInfo(idError, fsOptions, arg1...argN) | ||
== Parameters == | == Parameters == | ||
; idError (ERRORID) - input | ;idError (ERRORID) - input: An [[ERRORID]] structure | ||
: An ERRORID structure | ;fsOptions (ULONG) - input: Option flags: | ||
::4000H Do not call DosBeep. | |||
::2000H Do not prompt the user. | |||
::0008H The next parameter is a base OS/2 error code. | |||
::0004H fsOptions must be set to 0004H to use the variable arguments arg1...argN. arg1 must contain the number of arguments that follow, not including arg1 itself. Note that fsOptions cannot equal 000CH; that is, DOSERROR and argcount are mutually exclusive. | |||
;arg1...argN (ULONG) - input: Variable number of optional arguments. | |||
:These parameters have no significance except when the presentation driver is reporting a base OS/2 error. The two examples that follow show how WinSetErrorInfo is used to post a presentation driver error and a base OS/2 error: | |||
; fsOptions (ULONG) - input : Option flags: | |||
4000H Do not call DosBeep. | |||
2000H Do not prompt the user. | |||
0008H The next parameter is a base OS/2 error code. | |||
0004H fsOptions must be set to 0004H to use the variable arguments arg1...argN. arg1 must contain the number of arguments that follow, not including arg1 itself. Note that fsOptions cannot equal 000CH; that is, DOSERROR and argcount are mutually exclusive. | |||
; arg1...argN (ULONG) - input | |||
: Variable number of optional arguments. | |||
: These parameters have no significance except when the presentation driver is reporting a base OS/2 error. The two examples that follow show how WinSetErrorInfo is used to post a presentation driver error and a base OS/2 error: | |||
Example #1. To post a presentation driver error: | Example #1. To post a presentation driver error: | ||
WinSetErrorInfo (ERRORID (SEVERITY_ERROR, PMERR_INV_COORDINATE), NOBEEP); | WinSetErrorInfo (ERRORID (SEVERITY_ERROR, PMERR_INV_COORDINATE), NOBEEP); | ||
Example #2. To post a base OS/2 error: | Example #2. To post a base OS/2 error: | ||
WinSetErrorInfo (ERRORID (SEVERITY_WARNING, ErrorCode), | WinSetErrorInfo (ERRORID (SEVERITY_WARNING, ErrorCode), | ||
(DOSERROR+NOBEEP+NOPROMPT), DosErrorCode); | (DOSERROR+NOBEEP+NOPROMPT), DosErrorCode); | ||
There is no return value for this function. | |||
There is no return value for this function. | |||
== Returns == | == Returns == | ||
There is no return value for this function. | There is no return value for this function. | ||
== Remarks == | == Remarks == | ||
The syntax of the call to WinSetErrorInfo allows a variable number of parameters. The minimum requirement is the appropriate ERRORID structure and a NULL value for fsOptions. | The syntax of the call to WinSetErrorInfo allows a variable number of parameters. The minimum requirement is the appropriate ERRORID structure and a NULL value for fsOptions. | ||
; Note: Presentation drivers do not need to import this function through the module definition file. | ;Note: Presentation drivers do not need to import this function through the module definition file. | ||
[[Category:Spl]] | [[Category:Spl]] |
Latest revision as of 22:00, 25 March 2020
WinSetErrorInfo posts an error message, which can be retrieved by an application that calls WinGetLastError.
Syntax
WinSetErrorInfo(idError, fsOptions, arg1...argN)
Parameters
- idError (ERRORID) - input
- An ERRORID structure
- fsOptions (ULONG) - input
- Option flags:
- 4000H Do not call DosBeep.
- 2000H Do not prompt the user.
- 0008H The next parameter is a base OS/2 error code.
- 0004H fsOptions must be set to 0004H to use the variable arguments arg1...argN. arg1 must contain the number of arguments that follow, not including arg1 itself. Note that fsOptions cannot equal 000CH; that is, DOSERROR and argcount are mutually exclusive.
- arg1...argN (ULONG) - input
- Variable number of optional arguments.
- These parameters have no significance except when the presentation driver is reporting a base OS/2 error. The two examples that follow show how WinSetErrorInfo is used to post a presentation driver error and a base OS/2 error:
Example #1. To post a presentation driver error:
WinSetErrorInfo (ERRORID (SEVERITY_ERROR, PMERR_INV_COORDINATE), NOBEEP);
Example #2. To post a base OS/2 error:
WinSetErrorInfo (ERRORID (SEVERITY_WARNING, ErrorCode), (DOSERROR+NOBEEP+NOPROMPT), DosErrorCode);
There is no return value for this function.
Returns
There is no return value for this function.
Remarks
The syntax of the call to WinSetErrorInfo allows a variable number of parameters. The minimum requirement is the appropriate ERRORID structure and a NULL value for fsOptions.
- Note
- Presentation drivers do not need to import this function through the module definition file.