Bewerken

Delen via


IoSetThreadHardErrorMode function (ntddk.h)

The IoSetThreadHardErrorMode routine enables or disables hard error reporting for the current thread.

Syntax

BOOLEAN IoSetThreadHardErrorMode(
  [in] BOOLEAN EnableHardErrors
);

Parameters

[in] EnableHardErrors

Specifies whether hard error reporting to the user should be enabled or disabled for this thread. A value of TRUE enables hard error reporting. FALSE disables it.

Return value

IoSetThreadHardErrorMode returns TRUE if hard errors were enabled from this thread before this routine completed execution. Otherwise, this routine returns FALSE.

Remarks

If hard errors are disabled for a given thread, calls to IoRaiseHardError will not display a message to the user indicating that a serious error has occurred. In addition, the IRP that is passed to IoRaiseHardError is completed without any data being copied into user buffers. Calling IoRaiseInformationalHardError after disabling hard errors causes that routine to always return FALSE for this thread.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Universal
Header ntddk.h (include Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <=DISPATCH_LEVEL

See also

IoRaiseHardError

IoRaiseInformationalHardError