Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

RtlCaptureStackBackTrace routine

The RtlCaptureStackBackTrace routine captures a stack back trace by walking up the stack and recording the information for each frame.

Syntax


USHORT RtlCaptureStackBackTrace(
  _In_      ULONG  FramesToSkip,
  _In_      ULONG  FramesToCapture,
  _Out_     PVOID  *BackTrace,
  _Out_opt_ PULONG BackTraceHash
);

Parameters

FramesToSkip [in]

The number of frames to skip from the start of the back trace.

FramesToCapture [in]

The number of frames to be captured.

BackTrace [out]

An array of pointers captured from the current stack trace.

BackTraceHash [out, optional]

An optional value that can be used to organize hash tables. If this parameter is NULL, no hash value is computed.

This value is calculated based on the values of the pointers returned in the BackTrace array. Two identical stack traces will generate identical hash values.

Return value

The number of captured frames.

Remarks

The RtlCaptureStackBackTrace routine captures a stack back trace by walking up the stack and recording the information for each frame.

Important   This is an exported function that MUST have access to pageable addresses to completely traverse the stack. If, not the routine may return 0 page frames.

In Windows XP and Windows Server 2003, the sum of the FramesToSkip and FramesToCapture parameters must be less than 63.

Windows Phone 8.1: This API is supported.

Requirements

Target platform

Universal

Version

Available in starting with Windows XP.

Header

Ntifs.h (include Ntifs.h or FltKernel.h)

Library

NtosKrnl.lib;
OneCoreUAP.lib on Windows 10

DLL

NtDll.dll (user mode);
NtosKrnl.exe (kernel mode)

IRQL

<= DISPATCH_LEVEL

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft