RtlSetProcessIsCritical - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

NTSYSAPI
NTSTATUS
STDAPIVCALLTYPE
RtlSetProcessIsCritical(
    _In_ BOOLEAN NewValue,
    _Out_opt_ PBOOLEAN OldValue,
    _In_ BOOLEAN CheckFlag
    );

#endif

View code on GitHub

Adjusts the critical state of the current process. Termination of a critical process causes a BSOD. Calling this function requires SeDebugPrivilege.

Parameters

Notable return values

Implementation details

This function uses NtQueryInformationProcess and NtSetInformationProcess with the PROCESSINFOCLASS value of ProcessBreakOnTermination (29) on the current process.

See also