Microsoft KB Archive/257172

{|
 * width="100%"|

PRB: SetErrorMode(0) Does Not Enable System Default Error Box

 * }

Q257172

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * Microsoft Windows 95
 * Microsoft Windows 98
 * Microsoft Windows 98 Second Edition
 * Microsoft Windows Millennium Edition

-

SYMPTOMS
The SetErrorMode(0) function does not enable the display of a system error box when a drive failure occurs, such as when there is no disk in drive A.

CAUSE
The Windows versions listed above do not invoke a system error dialog when a system error occurs. Calling SetErrorMode(0) causes Windows to use the default error mode, which on the above versions is simply to fail the call.

RESOLUTION
To notify the user of a system error, use the error handling of the appropriate application programming interface (API) to detect the failure and then display a dialog box.

Additional query words:

Keywords : kbAPI kbDebug kbKernBase kbSDKWin32 kbOSWin95 kbOSWin98 kbDSupport kbGrpDSKernBase

Issue type : kbprb

Technology : kbAudDeveloper kbWin32sSearch kbWin32API