RtlCaptureStackBackTrace function

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

Syntax

NTSYSAPI USHORT RtlCaptureStackBackTrace(
  ULONG  FramesToSkip,
  ULONG  FramesToCapture,
  PVOID  *BackTrace,
  PULONG BackTraceHash
);

Parameters

FramesToSkip

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

FramesToCapture

The number of frames to be captured.

BackTrace

An array of pointers captured from the current stack trace.

BackTraceHash

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.

Requirements

   
Windows version Available in starting with Windows XP.
Target Platform Universal
Header ntifs.h (include Ntifs.h, FltKernel.h)
Library NtosKrnl.lib; OneCoreUAP.lib on Windows 10
DLL NtDll.dll (user mode); NtosKrnl.exe (kernel mode)
IRQL "<= DISPATCH_LEVEL"