#ifndef _NTRTL_H
NTSYSAPI
NTSTATUS
NTAPI
RtlSetThreadErrorMode(
_In_ ULONG NewMode,
_Out_opt_ PULONG OldMode
);
View code on GitHubChanges the error mode for the current thread. The value controls how the system should handle serious errors.
NewMode - a bit mask with flags defining the new behavior.OldMode - a pointer to a variable that receives the previous error mode.SEM_FAILCRITICALERRORS - the system does not display the dialog on critical errors and lets the thread handle them.SEM_NOGPFAULTERRORBOX - The system does not display the Windows Error Reporting dialog.SEM_NOALIGNMENTFAULTEXCEPT - automatically fix alignment faults.SEM_NOOPENFILEERRORBOX - OpenFile does not display a message box when it fails to find a file.This function sets the HardErrorMode field in TEB.