The IoGetStackLimits routine returns the boundaries of the current thread's stack frame.
VOID
IoGetStackLimits(
OUT PULONG LowLimit,
OUT PULONG HighLimit
);
None
Declared in ntddk.h. Include ntddk.h.
Highest-level drivers can call this routine, particularly file systems that have been passed a pointer to a location on the current thread’s stack.
Callers of IoGetStackLimits must be running at IRQL < DISPATCH_LEVEL.