|
2 | 2 | title: "IDiaEnumStackFrames | Microsoft Docs"
|
3 | 3 | ms.date: "11/04/2016"
|
4 | 4 | ms.topic: "conceptual"
|
5 |
| -dev_langs: |
| 5 | +dev_langs: |
6 | 6 | - "C++"
|
7 |
| -helpviewer_keywords: |
| 7 | +helpviewer_keywords: |
8 | 8 | - "IDiaEnumStackFrames interface"
|
9 | 9 | ms.assetid: 3d1e8403-c9fc-42ff-ae35-0ab9a5ed2ad7
|
10 | 10 | author: "mikejo5000"
|
11 | 11 | ms.author: "mikejo"
|
12 | 12 | manager: jillfra
|
13 |
| -ms.workload: |
| 13 | +ms.workload: |
14 | 14 | - "multiple"
|
15 | 15 | ---
|
16 | 16 | # IDiaEnumStackFrames
|
17 |
| -Enumerates the various stack frames available. |
18 |
| - |
19 |
| -## Methods in Vtable Order |
20 |
| - |
21 |
| -|Method|Description| |
22 |
| -|------------|-----------------| |
23 |
| -|[IDiaEnumStackFrames::Next](../../debugger/debug-interface-access/idiaenumstackframes-next.md)|Retrieves a specified number of stack frame elements from the enumeration sequence.| |
24 |
| -|[IDiaEnumStackFrames::Reset](../../debugger/debug-interface-access/idiaenumstackframes-reset.md)|Resets an enumeration sequence to the beginning.| |
25 |
| - |
26 |
| -## Remarks |
27 |
| - |
28 |
| -## Notes for Callers |
29 |
| - Obtain this interface by calling the [IDiaStackWalker::getEnumFrames](../../debugger/debug-interface-access/idiastackwalker-getenumframes.md) or [IDiaStackWalker::getEnumFrames2](../../debugger/debug-interface-access/idiastackwalker-getenumframes2.md) methods. |
30 |
| - |
31 |
| -## Example |
32 |
| - This example shows how to obtain and use the `IDiaEnumStackFrames` interface. See the [IDiaStackFrame](../../debugger/debug-interface-access/idiastackframe.md) interface for an implementation of the `PrintStackFrame` function. |
33 |
| - |
34 |
| -```C++ |
35 |
| -void DumpStackFrames(IDiaStackWalker* pStackWalker, |
36 |
| - IDiaStackWalkHelper* pStackWalkHelper, |
37 |
| - CV_CPU_TYPE_e cpuType) |
38 |
| -{ |
39 |
| - if (pStackWalker != NULL && pStackWalkHelper != NULL) |
40 |
| - { |
41 |
| - CComPtr<IDiaEnumStackFrames> pEnumsFrames; |
42 |
| - HRESULT hr; |
43 |
| - hr = pStackWalker->getEnumFrames2(cpuType, pStackWalkHelper, &pEnumFrames); |
44 |
| - if (SUCCEEDED(hr) && pEnumFrames != NULL) |
45 |
| - { |
46 |
| - CComPtr<IDiaStackFrame> pStackFrame; |
47 |
| - DWORD celt = 0; |
48 |
| - |
49 |
| - while (pEnumFrames->Next(1, &pStackFrame, &celt) == S_OK) |
50 |
| - { |
51 |
| - PrintStackFrame(pStackFrame); |
52 |
| - } |
53 |
| - pStackFrame = NULL; |
54 |
| - } |
55 |
| - } |
56 |
| -} |
57 |
| -``` |
58 |
| - |
59 |
| -## Requirements |
60 |
| - Header: Dia2.h |
61 |
| - |
62 |
| - Library: diaguids.lib |
63 |
| - |
64 |
| - DLL: msdia80.dll |
65 |
| - |
66 |
| -## See Also |
67 |
| - [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
68 |
| - [IDiaStackWalkFrame](../../debugger/debug-interface-access/idiastackwalkframe.md) |
69 |
| - [IDiaStackWalker::getEnumFrames2](../../debugger/debug-interface-access/idiastackwalker-getenumframes2.md) |
70 |
| - [IDiaStackWalker::getEnumFrames](../../debugger/debug-interface-access/idiastackwalker-getenumframes.md) |
| 17 | +Enumerates the various stack frames available. |
| 18 | + |
| 19 | +## Methods in Vtable Order |
| 20 | + |
| 21 | +|Method|Description| |
| 22 | +|------------|-----------------| |
| 23 | +|[IDiaEnumStackFrames::Next](../../debugger/debug-interface-access/idiaenumstackframes-next.md)|Retrieves a specified number of stack frame elements from the enumeration sequence.| |
| 24 | +|[IDiaEnumStackFrames::Reset](../../debugger/debug-interface-access/idiaenumstackframes-reset.md)|Resets an enumeration sequence to the beginning.| |
| 25 | + |
| 26 | +## Remarks |
| 27 | + |
| 28 | +## Notes for Callers |
| 29 | +Obtain this interface by calling the [IDiaStackWalker::getEnumFrames](../../debugger/debug-interface-access/idiastackwalker-getenumframes.md) or [IDiaStackWalker::getEnumFrames2](../../debugger/debug-interface-access/idiastackwalker-getenumframes2.md) methods. |
| 30 | + |
| 31 | +## Example |
| 32 | +This example shows how to obtain and use the `IDiaEnumStackFrames` interface. See the [IDiaStackFrame](../../debugger/debug-interface-access/idiastackframe.md) interface for an implementation of the `PrintStackFrame` function. |
| 33 | + |
| 34 | +```C++ |
| 35 | +void DumpStackFrames(IDiaStackWalker* pStackWalker, |
| 36 | + IDiaStackWalkHelper* pStackWalkHelper, |
| 37 | + CV_CPU_TYPE_e cpuType) |
| 38 | +{ |
| 39 | + if (pStackWalker != NULL && pStackWalkHelper != NULL) |
| 40 | + { |
| 41 | + CComPtr<IDiaEnumStackFrames> pEnumsFrames; |
| 42 | + HRESULT hr; |
| 43 | + hr = pStackWalker->getEnumFrames2(cpuType, pStackWalkHelper, &pEnumFrames); |
| 44 | + if (SUCCEEDED(hr) && pEnumFrames != NULL) |
| 45 | + { |
| 46 | + CComPtr<IDiaStackFrame> pStackFrame; |
| 47 | + DWORD celt = 0; |
| 48 | + |
| 49 | + while (pEnumFrames->Next(1, &pStackFrame, &celt) == S_OK) |
| 50 | + { |
| 51 | + PrintStackFrame(pStackFrame); |
| 52 | + } |
| 53 | + pStackFrame = NULL; |
| 54 | + } |
| 55 | + } |
| 56 | +} |
| 57 | +``` |
| 58 | +
|
| 59 | +## Requirements |
| 60 | +Header: Dia2.h |
| 61 | +
|
| 62 | +Library: diaguids.lib |
| 63 | +
|
| 64 | +DLL: msdia80.dll |
| 65 | +
|
| 66 | +## See Also |
| 67 | +[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
| 68 | +[IDiaStackWalkFrame](../../debugger/debug-interface-access/idiastackwalkframe.md) |
| 69 | +[IDiaStackWalker::getEnumFrames2](../../debugger/debug-interface-access/idiastackwalker-getenumframes2.md) |
| 70 | +[IDiaStackWalker::getEnumFrames](../../debugger/debug-interface-access/idiastackwalker-getenumframes.md) |
0 commit comments