SetErrorMode

  UINT SetErrorMode(fuErrorMode)    
  UINT fuErrorMode; /* specifies the error-mode flag */

The SetErrorMode function controls whether Windows handles MS-DOS hard errors or allows the calling application to handle them.

Parameters

fuErrorMode

Specifies the error-mode flag. The flag can be a combination of the following values:

Value Meaning

SEM_FAILCRITICALERRORS  
  Windows does not display the critical-error-handler message box and returns the error to the calling application.
SEM_NOGPFAULTERRORBOX  
  Windows does not display the general-protection-fault message box. This flag should be set only by debugging applications that handle GP faults themselves.
SEM_NOOPENFILEERRORBOX  
  Windows does not display a message box when it fails to find a file.

Return Value

The return value is the previous state of the error-mode flag, if the function is successful.