Skip to content

Latest commit

 

History

History
75 lines (58 loc) · 2.51 KB

idiaenumstackframes.md

File metadata and controls

75 lines (58 loc) · 2.51 KB
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
C++
IDiaEnumStackFrames interface
mikejo5000
mikejo
mijacobs
debug-diagnostics

IDiaEnumStackFrames

Enumerates the various stack frames available.

Methods in Vtable Order

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.

Remarks

Notes for Callers

Obtain this interface by calling the IDiaStackWalker::getEnumFrames or IDiaStackWalker::getEnumFrames2 methods.

Example

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;
        }
    }
}

Requirements

Header: Dia2.h

Library: diaguids.lib

DLL: msdia80.dll

See also