GetThreadErrorMode function (errhandlingapi.h)

Retrieves the error mode for the calling thread.

Syntax

DWORD GetThreadErrorMode();

Return value

The process error mode. This function returns one of the following values.

Return code/value Description
SEM_FAILCRITICALERRORS
0x0001
The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling thread.
SEM_NOGPFAULTERRORBOX
0x0002
The system does not display the Windows Error Reporting dialog.
SEM_NOOPENFILEERRORBOX
0x8000
The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling thread.

Remarks

A thread inherits the error mode of the process in which it is running. To change the error mode for the thread, use the SetThreadErrorMode function.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header errhandlingapi.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

GetErrorMode

SetThreadErrorMode