description | title | ms.date | ms.topic | dev_langs | helpviewer_keywords | author | ms.author | manager | ms.subservice | ||
---|---|---|---|---|---|---|---|---|---|---|---|
Enumerates the various stack frames available. |
IDiaEnumStackFrames |
11/04/2016 |
reference |
|
|
mikejo5000 |
mikejo |
mijacobs |
debug-diagnostics |
Enumerates the various stack frames available.
Method | Description |
---|---|
IDiaEnumStackFrames::Next | Retrieves a specified number of stack frame elements from the enumeration sequence. |
IDiaEnumStackFrames::Reset | Resets an enumeration sequence to the beginning. |
Obtain this interface by calling the IDiaStackWalker::getEnumFrames or IDiaStackWalker::getEnumFrames2 methods.
This example shows how to obtain and use the IDiaEnumStackFrames
interface. See the IDiaStackFrame interface for an implementation of the PrintStackFrame
function.
void DumpStackFrames(IDiaStackWalker* pStackWalker,
IDiaStackWalkHelper* pStackWalkHelper,
CV_CPU_TYPE_e cpuType)
{
if (pStackWalker != NULL && pStackWalkHelper != NULL)
{
CComPtr<IDiaEnumStackFrames> pEnumsFrames;
HRESULT hr;
hr = pStackWalker->getEnumFrames2(cpuType, pStackWalkHelper, &pEnumFrames);
if (SUCCEEDED(hr) && pEnumFrames != NULL)
{
CComPtr<IDiaStackFrame> pStackFrame;
DWORD celt = 0;
while (pEnumFrames->Next(1, &pStackFrame, &celt) == S_OK)
{
PrintStackFrame(pStackFrame);
}
pStackFrame = NULL;
}
}
}
Header: Dia2.h
Library: diaguids.lib
DLL: msdia80.dll