|
2 | 2 | title: "IDiaEnumFrameData | 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 | - "IDiaEnumFrameData interface"
|
9 | 9 | ms.assetid: 2ca7fd5a-b2fa-4b3a-9492-0263eafc435b
|
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 | # IDiaEnumFrameData
|
17 |
| -Enumerates the various frame data elements contained in the data source. |
18 |
| - |
19 |
| -## Syntax |
20 |
| - |
21 |
| -``` |
22 |
| -IDiaEnumFrameData : IUnknown |
23 |
| -``` |
24 |
| - |
25 |
| -## Methods in Vtable Order |
26 |
| - The following table shows the methods of `IDiaEnumFrameData`. |
27 |
| - |
28 |
| -|Method|Description| |
29 |
| -|------------|-----------------| |
30 |
| -|[IDiaEnumFrameData::get__NewEnum](../../debugger/debug-interface-access/idiaenumframedata-get-newenum.md)|Retrieves the `IEnumVARIANT Interface` version of this enumerator.| |
31 |
| -|[IDiaEnumFrameData::get_Count](../../debugger/debug-interface-access/idiaenumframedata-get-count.md)|Retrieves the number of frame data elements.| |
32 |
| -|[IDiaEnumFrameData::Item](../../debugger/debug-interface-access/idiaenumframedata-item.md)|Retrieves a frame data element by means of an index.| |
33 |
| -|[IDiaEnumFrameData::Next](../../debugger/debug-interface-access/idiaenumframedata-next.md)|Retrieves a specified number of frame data elements in the enumeration sequence.| |
34 |
| -|[IDiaEnumFrameData::Skip](../../debugger/debug-interface-access/idiaenumframedata-skip.md)|Skips a specified number of frame data elements in an enumeration sequence.| |
35 |
| -|[IDiaEnumFrameData::Reset](../../debugger/debug-interface-access/idiaenumframedata-reset.md)|Resets an enumeration sequence to the beginning.| |
36 |
| -|[IDiaEnumFrameData::Clone](../../debugger/debug-interface-access/idiaenumframedata-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.| |
37 |
| -|[IDiaEnumFrameData::frameByRVA](../../debugger/debug-interface-access/idiaenumframedata-framebyrva.md)|Returns a frame by relative virtual address (RVA).| |
38 |
| -|[IDiaEnumFrameData::frameByVA](../../debugger/debug-interface-access/idiaenumframedata-framebyva.md)|Returns a frame by virtual address (VA).| |
39 |
| - |
40 |
| -## Remarks |
41 |
| - |
42 |
| -## Notes for Callers |
43 |
| - Obtain this interface from the [IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md) method. See the example for details. |
44 |
| - |
45 |
| -## Example |
46 |
| - This example shows how to obtain (the `GetEnumFrameData` function) and use (the `ShowFrameData` function) the `IDiaEnumFrameData` interface. See the [IDiaFrameData](../../debugger/debug-interface-access/idiaframedata.md) interface for an example of the `PrintFrameData` function. |
47 |
| - |
48 |
| -```C++ |
49 |
| - |
50 |
| - IDiaEnumFrameData* GetEnumFrameData(IDiaSession *pSession) |
51 |
| -{ |
52 |
| - IDiaEnumFrameData* pUnknown = NULL; |
53 |
| - REFIID iid = __uuidof(IDiaEnumFrameData); |
54 |
| - IDiaEnumTables* pEnumTables = NULL; |
55 |
| - IDiaTable* pTable = NULL; |
56 |
| - ULONG celt = 0; |
57 |
| - |
58 |
| - if (pSession->getEnumTables(&pEnumTables) != S_OK) |
59 |
| - { |
60 |
| - wprintf(L"ERROR - GetTable() getEnumTables\n"); |
61 |
| - return NULL; |
62 |
| - } |
63 |
| - while (pEnumTables->Next(1, &pTable, &celt) == S_OK && celt == 1) |
64 |
| - { |
65 |
| - // There is only one table that matches the given iid |
66 |
| - HRESULT hr = pTable->QueryInterface(iid, (void**)&pUnknown); |
67 |
| - pTable->Release(); |
68 |
| - if (hr == S_OK) |
69 |
| - { |
70 |
| - break; |
71 |
| - } |
72 |
| - } |
73 |
| - pEnumTables->Release(); |
74 |
| - return pUnknown; |
75 |
| -} |
76 |
| - |
77 |
| -void ShowFrameData(IDiaSession *pSession) |
78 |
| -{ |
79 |
| - IDiaEnumFrameData* pEnumFrameData = GetEnumFrameData(pSession);; |
80 |
| - |
81 |
| - if (pEnumFrameData != NULL) |
82 |
| - { |
83 |
| - IDiaFrameData* pFrameData; |
84 |
| - ULONG celt = 0; |
85 |
| - |
86 |
| - while(pEnumFrameData->Next(1, &pFrameData, &celt) == S_OK && |
87 |
| - celt == 1) |
88 |
| - { |
89 |
| - PrintFrameData(pFrameData); |
90 |
| - pFrameData->Release(); |
91 |
| - } |
92 |
| - pEnumFrameData->Release(); |
93 |
| - } |
94 |
| -} |
95 |
| -``` |
96 |
| - |
97 |
| -## Requirements |
98 |
| - **Header:** Dia2.h |
99 |
| - |
100 |
| - **Library:** diaguids.lib |
101 |
| - |
102 |
| - **DLL:** msdia80.dll |
103 |
| - |
104 |
| -## See Also |
105 |
| - [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
106 |
| - [IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md) |
107 |
| - [IDiaFrameData](../../debugger/debug-interface-access/idiaframedata.md) |
| 17 | +Enumerates the various frame data elements contained in the data source. |
| 18 | + |
| 19 | +## Syntax |
| 20 | + |
| 21 | +``` |
| 22 | +IDiaEnumFrameData : IUnknown |
| 23 | +``` |
| 24 | + |
| 25 | +## Methods in Vtable Order |
| 26 | +The following table shows the methods of `IDiaEnumFrameData`. |
| 27 | + |
| 28 | +|Method|Description| |
| 29 | +|------------|-----------------| |
| 30 | +|[IDiaEnumFrameData::get__NewEnum](../../debugger/debug-interface-access/idiaenumframedata-get-newenum.md)|Retrieves the `IEnumVARIANT Interface` version of this enumerator.| |
| 31 | +|[IDiaEnumFrameData::get_Count](../../debugger/debug-interface-access/idiaenumframedata-get-count.md)|Retrieves the number of frame data elements.| |
| 32 | +|[IDiaEnumFrameData::Item](../../debugger/debug-interface-access/idiaenumframedata-item.md)|Retrieves a frame data element by means of an index.| |
| 33 | +|[IDiaEnumFrameData::Next](../../debugger/debug-interface-access/idiaenumframedata-next.md)|Retrieves a specified number of frame data elements in the enumeration sequence.| |
| 34 | +|[IDiaEnumFrameData::Skip](../../debugger/debug-interface-access/idiaenumframedata-skip.md)|Skips a specified number of frame data elements in an enumeration sequence.| |
| 35 | +|[IDiaEnumFrameData::Reset](../../debugger/debug-interface-access/idiaenumframedata-reset.md)|Resets an enumeration sequence to the beginning.| |
| 36 | +|[IDiaEnumFrameData::Clone](../../debugger/debug-interface-access/idiaenumframedata-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.| |
| 37 | +|[IDiaEnumFrameData::frameByRVA](../../debugger/debug-interface-access/idiaenumframedata-framebyrva.md)|Returns a frame by relative virtual address (RVA).| |
| 38 | +|[IDiaEnumFrameData::frameByVA](../../debugger/debug-interface-access/idiaenumframedata-framebyva.md)|Returns a frame by virtual address (VA).| |
| 39 | + |
| 40 | +## Remarks |
| 41 | + |
| 42 | +## Notes for Callers |
| 43 | +Obtain this interface from the [IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md) method. See the example for details. |
| 44 | + |
| 45 | +## Example |
| 46 | +This example shows how to obtain (the `GetEnumFrameData` function) and use (the `ShowFrameData` function) the `IDiaEnumFrameData` interface. See the [IDiaFrameData](../../debugger/debug-interface-access/idiaframedata.md) interface for an example of the `PrintFrameData` function. |
| 47 | + |
| 48 | +```C++ |
| 49 | + |
| 50 | + IDiaEnumFrameData* GetEnumFrameData(IDiaSession *pSession) |
| 51 | +{ |
| 52 | + IDiaEnumFrameData* pUnknown = NULL; |
| 53 | + REFIID iid = __uuidof(IDiaEnumFrameData); |
| 54 | + IDiaEnumTables* pEnumTables = NULL; |
| 55 | + IDiaTable* pTable = NULL; |
| 56 | + ULONG celt = 0; |
| 57 | + |
| 58 | + if (pSession->getEnumTables(&pEnumTables) != S_OK) |
| 59 | + { |
| 60 | + wprintf(L"ERROR - GetTable() getEnumTables\n"); |
| 61 | + return NULL; |
| 62 | + } |
| 63 | + while (pEnumTables->Next(1, &pTable, &celt) == S_OK && celt == 1) |
| 64 | + { |
| 65 | + // There is only one table that matches the given iid |
| 66 | + HRESULT hr = pTable->QueryInterface(iid, (void**)&pUnknown); |
| 67 | + pTable->Release(); |
| 68 | + if (hr == S_OK) |
| 69 | + { |
| 70 | + break; |
| 71 | + } |
| 72 | + } |
| 73 | + pEnumTables->Release(); |
| 74 | + return pUnknown; |
| 75 | +} |
| 76 | + |
| 77 | +void ShowFrameData(IDiaSession *pSession) |
| 78 | +{ |
| 79 | + IDiaEnumFrameData* pEnumFrameData = GetEnumFrameData(pSession);; |
| 80 | + |
| 81 | + if (pEnumFrameData != NULL) |
| 82 | + { |
| 83 | + IDiaFrameData* pFrameData; |
| 84 | + ULONG celt = 0; |
| 85 | + |
| 86 | + while(pEnumFrameData->Next(1, &pFrameData, &celt) == S_OK && |
| 87 | + celt == 1) |
| 88 | + { |
| 89 | + PrintFrameData(pFrameData); |
| 90 | + pFrameData->Release(); |
| 91 | + } |
| 92 | + pEnumFrameData->Release(); |
| 93 | + } |
| 94 | +} |
| 95 | +``` |
| 96 | +
|
| 97 | +## Requirements |
| 98 | +**Header:** Dia2.h |
| 99 | +
|
| 100 | +**Library:** diaguids.lib |
| 101 | +
|
| 102 | +**DLL:** msdia80.dll |
| 103 | +
|
| 104 | +## See Also |
| 105 | +[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
| 106 | +[IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md) |
| 107 | +[IDiaFrameData](../../debugger/debug-interface-access/idiaframedata.md) |
0 commit comments