|
2 | 2 | title: "IDiaEnumSourceFiles | 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 | - "IDiaEnumSourceFiles interface"
|
9 | 9 | ms.assetid: 5c0779a6-a2ea-408a-90da-ebdecf2b83c0
|
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 | # IDiaEnumSourceFiles
|
17 |
| -Enumerates the various source files contained in the data source. |
18 |
| - |
19 |
| -## Syntax |
20 |
| - |
21 |
| -``` |
22 |
| -IDiaEnumSourceFiles : IUnknown |
23 |
| -``` |
24 |
| - |
25 |
| -## Methods in Vtable Order |
26 |
| - The following table shows the methods of `IDiaEnumSourceFiles`. |
27 |
| - |
28 |
| -|Method|Description| |
29 |
| -|------------|-----------------| |
30 |
| -|[IDiaEnumSourceFiles::get__NewEnum](../../debugger/debug-interface-access/idiaenumsourcefiles-get-newenum.md)|Retrieves the `IEnumVARIANT Interface` version of this enumerator.| |
31 |
| -|[IDiaEnumSourceFiles::get_Count](../../debugger/debug-interface-access/idiaenumsourcefiles-get-count.md)|Retrieves the number of source files.| |
32 |
| -|[IDiaEnumSourceFiles::Item](../../debugger/debug-interface-access/idiaenumsourcefiles-item.md)|Retrieves a source file by means of an index.| |
33 |
| -|[IDiaEnumSourceFiles::Next](../../debugger/debug-interface-access/idiaenumsourcefiles-next.md)|Retrieves a specified number of source files in the enumeration sequence.| |
34 |
| -|[IDiaEnumSourceFiles::Skip](../../debugger/debug-interface-access/idiaenumsourcefiles-skip.md)|Skips a specified number of source files in an enumeration sequence.| |
35 |
| -|[IDiaEnumSourceFiles::Reset](../../debugger/debug-interface-access/idiaenumsourcefiles-reset.md)|Resets an enumeration sequence to the beginning.| |
36 |
| -|[IDiaEnumSourceFiles::Clone](../../debugger/debug-interface-access/idiaenumsourcefiles-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.| |
37 |
| - |
38 |
| -## Remarks |
39 |
| - |
40 |
| -## Notes for Callers |
41 |
| - Obtain this interface by calling the `QueryInterface` method on an [IDiaTable](../../debugger/debug-interface-access/idiatable.md) object. See the example for details. |
42 |
| - |
43 |
| -## Example |
44 |
| - This example shows how to obtain the `IDiaEnumSourceFiles` interface from the list of tables in a DIA session object. For an example of accessing source file information, see the [IDiaSourceFile](../../debugger/debug-interface-access/idiasourcefile.md) interface. |
45 |
| - |
46 |
| -```C++ |
47 |
| - |
48 |
| -IDiaEnumSourceFiles* GetEnumSourceFiles(IDiaSession *pSession) |
49 |
| -{ |
50 |
| - IDiaEnumSourceFiles * pUnknown = NULL; |
51 |
| - REFIID iid = __uuidof(IDiaEnumSourceFiles); |
52 |
| - IDiaEnumTables* pEnumTables = NULL; |
53 |
| - IDiaTable* pTable = NULL; |
54 |
| - ULONG celt = 0; |
55 |
| - |
56 |
| - if (pSession->getEnumTables(&pEnumTables) != S_OK) |
57 |
| - { |
58 |
| - wprintf(L"ERROR - GetTable() getEnumTables\n"); |
59 |
| - return NULL; |
60 |
| - } |
61 |
| - while (pEnumTables->Next(1, &pTable, &celt) == S_OK && celt == 1) |
62 |
| - { |
63 |
| - // There is only one table that matches the given iid |
64 |
| - HRESULT hr = pTable->QueryInterface(iid, (void**)&pUnknown); |
65 |
| - pTable->Release(); |
66 |
| - if (hr == S_OK) |
67 |
| - { |
68 |
| - break; |
69 |
| - } |
70 |
| - } |
71 |
| - pEnumTables->Release(); |
72 |
| - return pUnknown; |
73 |
| -} |
74 |
| -``` |
75 |
| - |
76 |
| -## Requirements |
77 |
| - Header: Dia2.h |
78 |
| - |
79 |
| - Library: diaguids.lib |
80 |
| - |
81 |
| - DLL: msdia80.dll |
82 |
| - |
83 |
| -## See Also |
84 |
| - [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
85 |
| - [IDiaSession::findFile](../../debugger/debug-interface-access/idiasession-findfile.md) |
86 |
| - [IDiaSession::findLinesByLinenum](../../debugger/debug-interface-access/idiasession-findlinesbylinenum.md) |
87 |
| - [IDiaTable](../../debugger/debug-interface-access/idiatable.md) |
| 17 | +Enumerates the various source files contained in the data source. |
| 18 | + |
| 19 | +## Syntax |
| 20 | + |
| 21 | +``` |
| 22 | +IDiaEnumSourceFiles : IUnknown |
| 23 | +``` |
| 24 | + |
| 25 | +## Methods in Vtable Order |
| 26 | +The following table shows the methods of `IDiaEnumSourceFiles`. |
| 27 | + |
| 28 | +|Method|Description| |
| 29 | +|------------|-----------------| |
| 30 | +|[IDiaEnumSourceFiles::get__NewEnum](../../debugger/debug-interface-access/idiaenumsourcefiles-get-newenum.md)|Retrieves the `IEnumVARIANT Interface` version of this enumerator.| |
| 31 | +|[IDiaEnumSourceFiles::get_Count](../../debugger/debug-interface-access/idiaenumsourcefiles-get-count.md)|Retrieves the number of source files.| |
| 32 | +|[IDiaEnumSourceFiles::Item](../../debugger/debug-interface-access/idiaenumsourcefiles-item.md)|Retrieves a source file by means of an index.| |
| 33 | +|[IDiaEnumSourceFiles::Next](../../debugger/debug-interface-access/idiaenumsourcefiles-next.md)|Retrieves a specified number of source files in the enumeration sequence.| |
| 34 | +|[IDiaEnumSourceFiles::Skip](../../debugger/debug-interface-access/idiaenumsourcefiles-skip.md)|Skips a specified number of source files in an enumeration sequence.| |
| 35 | +|[IDiaEnumSourceFiles::Reset](../../debugger/debug-interface-access/idiaenumsourcefiles-reset.md)|Resets an enumeration sequence to the beginning.| |
| 36 | +|[IDiaEnumSourceFiles::Clone](../../debugger/debug-interface-access/idiaenumsourcefiles-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.| |
| 37 | + |
| 38 | +## Remarks |
| 39 | + |
| 40 | +## Notes for Callers |
| 41 | +Obtain this interface by calling the `QueryInterface` method on an [IDiaTable](../../debugger/debug-interface-access/idiatable.md) object. See the example for details. |
| 42 | + |
| 43 | +## Example |
| 44 | +This example shows how to obtain the `IDiaEnumSourceFiles` interface from the list of tables in a DIA session object. For an example of accessing source file information, see the [IDiaSourceFile](../../debugger/debug-interface-access/idiasourcefile.md) interface. |
| 45 | + |
| 46 | +```C++ |
| 47 | + |
| 48 | +IDiaEnumSourceFiles* GetEnumSourceFiles(IDiaSession *pSession) |
| 49 | +{ |
| 50 | + IDiaEnumSourceFiles * pUnknown = NULL; |
| 51 | + REFIID iid = __uuidof(IDiaEnumSourceFiles); |
| 52 | + IDiaEnumTables* pEnumTables = NULL; |
| 53 | + IDiaTable* pTable = NULL; |
| 54 | + ULONG celt = 0; |
| 55 | + |
| 56 | + if (pSession->getEnumTables(&pEnumTables) != S_OK) |
| 57 | + { |
| 58 | + wprintf(L"ERROR - GetTable() getEnumTables\n"); |
| 59 | + return NULL; |
| 60 | + } |
| 61 | + while (pEnumTables->Next(1, &pTable, &celt) == S_OK && celt == 1) |
| 62 | + { |
| 63 | + // There is only one table that matches the given iid |
| 64 | + HRESULT hr = pTable->QueryInterface(iid, (void**)&pUnknown); |
| 65 | + pTable->Release(); |
| 66 | + if (hr == S_OK) |
| 67 | + { |
| 68 | + break; |
| 69 | + } |
| 70 | + } |
| 71 | + pEnumTables->Release(); |
| 72 | + return pUnknown; |
| 73 | +} |
| 74 | +``` |
| 75 | +
|
| 76 | +## Requirements |
| 77 | +Header: Dia2.h |
| 78 | +
|
| 79 | +Library: diaguids.lib |
| 80 | +
|
| 81 | +DLL: msdia80.dll |
| 82 | +
|
| 83 | +## See Also |
| 84 | +[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md) |
| 85 | +[IDiaSession::findFile](../../debugger/debug-interface-access/idiasession-findfile.md) |
| 86 | +[IDiaSession::findLinesByLinenum](../../debugger/debug-interface-access/idiasession-findlinesbylinenum.md) |
| 87 | +[IDiaTable](../../debugger/debug-interface-access/idiatable.md) |
0 commit comments