WindowsApi:CaptureBackTrace
lastmod 2026-11-10created 2016-12-252 edits
CaptureStackBackTrace is a Windows API function that walks up the current thread's call stack and stores the return address of each frame in an array. It takes as arguments the number of frames to skip, the maximum number of frames to capture, an array to receive the addresses, and an optional pointer to receive a stack hash value, and it returns the number of frames actually captured. It is used to record allocation sites in memory leak tracking or logging, and to turn addresses into function names you use DbgHelp's SymFromAddr alongside it.
See also
Favorite site
- [https://msdn.microsoft.com/en-us/library/windows/desktop/bb204633(v=vs.85.aspx MSDN: CaptureStackBackTrace function]