IDiaEnumFrameData
Enumerates the various frame data elements contained in the data source.
IDiaEnumFrameData : IUnknown
Methods in Vtable Order
The following table shows the methods of IDiaEnumFrameData.
Method |
Description |
---|---|
Retrieves the IEnumVARIANT Interface version of this enumerator. |
|
Retrieves the number of frame data elements. |
|
Retrieves a frame data element by means of an index. |
|
Retrieves a specified number of frame data elements in the enumeration sequence. |
|
Skips a specified number of frame data elements in an enumeration sequence. |
|
Resets an enumeration sequence to the beginning. |
|
Creates an enumerator that contains the same enumeration state as the current enumerator. |
|
Returns a frame by relative virtual address (RVA). |
|
Returns a frame by virtual address (VA). |
Remarks
Notes for Callers
Obtain this interface from the IDiaSession::getEnumTables method. See the example for details.
Example
This example shows how to obtain (the GetEnumFrameData function) and use (the ShowFrameData function) the IDiaEnumFrameData interface. See the IDiaFrameData interface for an example of the PrintFrameData function.
IDiaEnumFrameData* GetEnumFrameData(IDiaSession *pSession)
{
IDiaEnumFrameData* pUnknown = NULL;
REFIID iid = __uuidof(IDiaEnumFrameData);
IDiaEnumTables* pEnumTables = NULL;
IDiaTable* pTable = NULL;
ULONG celt = 0;
if (pSession->getEnumTables(&pEnumTables) != S_OK)
{
wprintf(L"ERROR - GetTable() getEnumTables\n");
return NULL;
}
while (pEnumTables->Next(1, &pTable, &celt) == S_OK && celt == 1)
{
// There is only one table that matches the given iid
HRESULT hr = pTable->QueryInterface(iid, (void**)&pUnknown);
pTable->Release();
if (hr == S_OK)
{
break;
}
}
pEnumTables->Release();
return pUnknown;
}
void ShowFrameData(IDiaSession *pSession)
{
IDiaEnumFrameData* pEnumFrameData = GetEnumFrameData(pSession);;
if (pEnumFrameData != NULL)
{
IDiaFrameData* pFrameData;
ULONG celt = 0;
while(pEnumFrameData->Next(1, &pFrameData, &celt) == S_OK &&
celt == 1)
{
PrintFrameData(pFrameData);
pFrameData->Release();
}
pEnumFrameData->Release();
}
}
Requirements
Header: Dia2.h
Library: diaguids.lib
DLL: msdia80.dll