KeEnterGuardedRegion function (ntddk.h)

The KeEnterGuardedRegion routine enters a guarded region, which disables all kernel-mode APC delivery to the current thread.

Syntax

void KeEnterGuardedRegion();

Return value

None

Remarks

To exit a guarded region entered with KeEnterGuardedRegion, call the KeLeaveGuardedRegion routine. Guarded regions can be nested. APCs are not reenabled until the thread exits the outermost guarded region.

For more information about guarded regions, see Critical Regions and Guarded Regions.

Requirements

Requirement Value
Minimum supported client Available in Windows Server 2003 and later versions of Windows.
Target Platform Universal
Header ntddk.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL
DDI compliance rules GuardedRegions(wdm), HwStorPortProhibitedDDIs(storport), IrqlKeApcLte2(wdm), WithinCriticalRegion(wdm)

See also

KeLeaveGuardedRegion