IoWithinStackLimits function (wdm.h)

The IoWithinStackLimits routine determines whether a region of memory is within the stack limit of the current thread.

Syntax

LOGICAL IoWithinStackLimits(
  [in] ULONG_PTR RegionStart,
  [in] SIZE_T    RegionSize
);

Parameters

[in] RegionStart

A pointer to the start of the region.

[in] RegionSize

The size of the region.

Return value

IoWithinStackLimits returns TRUE is the current thread's stack contains the region completely and FALSE otherwise.

Remarks

The IoWithinStackLimits routine considers all possible stack segments and the DPC stack, if necessary.

For drivers that use KeExpandKernelStackAndCallout, IoWithinStackLimits considers only the current thread.

Requirements

Requirement Value
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL IRQL <= APC_LEVEL

See also

IoGetInitialStack

IoGetRemainingStackSize

IoGetStackLimits