Windows Driver Kit: Kernel-Mode Driver Architecture
KeExpandKernelStackAndCallout
The KeExpandKernelStackAndCallout routine calls a routine with a guaranteed amount of stack space.
NTSTATUS
KeExpandKernelStackAndCallout(
__in PEXPAND_STACK_CALLOUT Callout,
__in_opt PVOID Parameter,
__in SIZE_T Size
);
Parameters
- Callout
- Pointer to an ExpandedStackCall routine.
- Parameter
- Specifies the parameter to pass to ExpandedStackCall.
- Size
- Specifies the number of bytes on the stack to provide to ExpandedStackCall. This value must be large enough to accommodate the stack usage of ExpandedStackCall and any call that ExpandedStackCall might make. This value must be smaller than MAXIMUM_EXPANSION_SIZE.
Return Value
KeExpandKernelStackAndCallout returns STATUS_SUCCESS if the operation succeeds or the appropriate NTSTATUS value if the operation fails.
Comments
KeExpandKernelStackAndCallout expands the kernel stack by Size bytes for use by ExpandedStackCall. If there is not enough space available on the stack, KeExpandKernelStackAndCallout allocates a new kernel stack segment. The routine then calls ExpandedStackCall.
In Windows Vista and later versions of Windows, consider using the KeExpandKernelStackAndCalloutEx routine instead of KeExpandKernelStackAndCallout. KeExpandKernelStackAndCalloutEx is similar to KeExpandKernelStackAndCallout but has additional parameters and can be called at IRQL =< DISPATCH_LEVEL.
Requirements
Versions: Available for Windows Server 2003 on x64-based processors, and for Windows Vista and later versions of the Windows operating system on all processors.
IRQL: <= APC_LEVEL
Headers: Declared in Ntddk.h. Include Ntddk.h.
See Also
ExpandedStackCall, KeExpandKernelStackAndCalloutEx