WORD SetErrorMode (wMode)
This function controls whether Windows handles DOS Function 24H errors or allows the calling application to handle them.
Windows intercepts all INT 24H errors. If the application calls SetErrorMode with the wMode parameter set to zero and an INT 24H error subsequently occurs, Windows displays an error message box. If the application calls SetErrorMode with wMode set to 1 and an INT 24H occurs, Windows does not display the standard INT 24H error message box, but rather fails the original INT 21H call back to the application. This allows the application to handle disk errors using INT 21H, AH=59H (Get Extended Error) as appropriate.
Parameter | Type/Description |
wMode | WORD Specifies the error mode flag. If bit 0 is set to zero, Windows displays an error message box when an INT 24H error occurs. If bit 0 is set to 1, Windows fails the INT 21H call to the calling application and does not display a message box. |
The return value specifies the previous value of the error mode flag.