Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:fapi:doserror [2018/08/31 13:08] – created prokushev | en:docs:fapi:doserror [2021/09/17 09:43] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{page> | ||
+ | |||
+ | ====== DosError ====== | ||
This call allows an OS/2 process to receive hard error notification without generating a hard error signal. | This call allows an OS/2 process to receive hard error notification without generating a hard error signal. | ||
- | ==Syntax== | + | ===== Syntax |
- | | + | <code c> |
+ | DosError (Flag) | ||
+ | </ | ||
+ | |||
+ | ===== Parameters ===== | ||
+ | |||
+ | * Flags ([[USHORT]]) - input : Bit field, defined in the following example (the unused high-order bits are reserved and must be set to zero). | ||
+ | ^ Bit ^ Description ^ | ||
+ | | 15-2 | Reserved, set to zero | | ||
+ | | 1 | 0 = Enable exception popups. | ||
+ | | 0 | 0 = Disable hard error popups (fail requests). | ||
+ | |||
+ | ===== Return Code ===== | ||
- | ==Parameters== | + | rc ([[USHORT]]) - return |
- | ; | + | |
- | | + | |
- | | + | |
- | + | ||
- | | + | |
- | 1 = Disable exception popups. | + | |
- | + | ||
- | | + | |
- | 1 = Enable hard error popups. | + | |
- | ==Return Code== | ||
- | rc (USHORT) - return | ||
Return code descriptions are: | Return code descriptions are: | ||
- | *0 NO_ERROR | ||
- | *87 ERROR_INVALID_PARAMETER | ||
- | ==Remarks== | + | *0 NO_ERROR |
+ | *87 ERROR_INVALID_PARAMETER | ||
+ | |||
+ | ===== Remarks ===== | ||
DosError allows an OS/2 process to disable user notification if a program (or untrapped numeric processor) exception occurs. If end user notification is disabled, and if one of these exceptions occurs, the process is terminated. | DosError allows an OS/2 process to disable user notification if a program (or untrapped numeric processor) exception occurs. If end user notification is disabled, and if one of these exceptions occurs, the process is terminated. | ||
Hard errors generated under a process that has issued a DosError call are failed, and the appropriate error code is returned. The default situation is both hard error pop-ups and exception pop-ups are enabled, if DosError is not issued. | Hard errors generated under a process that has issued a DosError call are failed, and the appropriate error code is returned. The default situation is both hard error pop-ups and exception pop-ups are enabled, if DosError is not issued. | ||
- | ===Family API Considerations=== | + | ==== Family API Considerations ==== |
Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to DosError when coding for the DOS mode: | Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to DosError when coding for the DOS mode: | ||
Line 33: | Line 40: | ||
Note: Since INT 24 is not issued in DOS mode, this call has no effect when running in DOS mode. | Note: Since INT 24 is not issued in DOS mode, this call has no effect when running in DOS mode. | ||
- | ==Bindings== | + | ===== Bindings ===== |
- | ===C Binding=== | + | |
- | <PRE> | + | ==== C Binding ==== |
+ | |||
+ | <code c> | ||
#define INCL_DOSMISC | #define INCL_DOSMISC | ||
Line 42: | Line 51: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM Binding=== | + | ==== MASM Binding ==== |
- | <PRE> | + | |
+ | <code asm> | ||
EXTRN DosError: | EXTRN DosError: | ||
INCL_DOSMISC | INCL_DOSMISC | ||
Line 53: | Line 63: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
+ | |||
+ | ==== Example Code ==== | ||
- | ==Example Code== | ||
This example disables hard error popups and exception popups, then re-enables them. | This example disables hard error popups and exception popups, then re-enables them. | ||
- | <PRE> | + | <code c> |
#define INCL_DOSQUEUES | #define INCL_DOSQUEUES | ||
Line 71: | Line 82: | ||
rc = DosError(DISABLE_ERRORPOPUPS); | rc = DosError(DISABLE_ERRORPOPUPS); | ||
rc = DosError(ENABLE_ERRORPOPUPS); | rc = DosError(ENABLE_ERRORPOPUPS); | ||
- | </PRE> | + | </code> |
- | + | ||
- | ====== Note ====== | + | ===== Note ===== |
Text based on [[http:// | Text based on [[http:// |