Skip to content

Commit 6be6bf8

Browse files
authored
Merge pull request #2401 from changeworld/patch-4
Delete unnecessary spaces
2 parents 3a8ce3f + 664393e commit 6be6bf8

File tree

1 file changed

+101
-101
lines changed

1 file changed

+101
-101
lines changed

docs/debugger/debug-interface-access/idiaenuminjectedsources.md

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -2,113 +2,113 @@
22
title: "IDiaEnumInjectedSources | Microsoft Docs"
33
ms.date: "11/04/2016"
44
ms.topic: "conceptual"
5-
dev_langs:
5+
dev_langs:
66
- "C++"
7-
helpviewer_keywords:
7+
helpviewer_keywords:
88
- "IDiaEnumInjectedSources interface"
99
ms.assetid: f97e2392-22e1-48da-b7ce-ad94c8b684b0
1010
author: "mikejo5000"
1111
ms.author: "mikejo"
1212
manager: jillfra
13-
ms.workload:
13+
ms.workload:
1414
- "multiple"
1515
---
1616
# IDiaEnumInjectedSources
17-
Enumerate the various injected sources contained in the data source.
18-
19-
## Syntax
20-
21-
```
22-
IDiaEnumInjectedSources : IUnknown
23-
```
24-
25-
## Methods in Vtable Order
26-
The following table shows the methods of `IDiaEnumInjectedSources`.
27-
28-
|Method|Description|
29-
|------------|-----------------|
30-
|[IDiaEnumInjectedSources::get__NewEnum](../../debugger/debug-interface-access/idiaenuminjectedsources-get-newenum.md)|Retrieves the [IEnumVARIANT Interface](/previous-versions/windows/desktop/api/oaidl/nn-oaidl-ienumvariant) version of this enumerator.|
31-
|[IDiaEnumInjectedSources::get_Count](../../debugger/debug-interface-access/idiaenuminjectedsources-get-count.md)|Retrieves the number of injected sources.|
32-
|[IDiaEnumInjectedSources::Item](../../debugger/debug-interface-access/idiaenuminjectedsources-item.md)|Retrieves an injected source by means of an index.|
33-
|[IDiaEnumInjectedSources::Next](../../debugger/debug-interface-access/idiaenuminjectedsources-next.md)|Retrieves a specified number of injected sources in the enumeration sequence.|
34-
|[IDiaEnumInjectedSources::Skip](../../debugger/debug-interface-access/idiaenuminjectedsources-skip.md)|Skips a specified number of injected sources in an enumeration sequence.|
35-
|[IDiaEnumInjectedSources::Reset](../../debugger/debug-interface-access/idiaenuminjectedsources-reset.md)|Resets an enumeration sequence to the beginning.|
36-
|[IDiaEnumInjectedSources::Clone](../../debugger/debug-interface-access/idiaenuminjectedsources-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.|
37-
38-
## Remarks
39-
40-
## Notes for Callers
41-
This interface is obtained by calling the [IDiaSession::findInjectedSource](../../debugger/debug-interface-access/idiasession-findinjectedsource.md) method with the name of a specific source file or by calling the [IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md) method with the GUID of the `IDiaEnumInjectedSources` interface.
42-
43-
## Example
44-
This example shows how to obtain (the `GetEnumInjectedSources` function) and use (the `DumpAllInjectedSources` function) the `IDiaEnumInjectedSources` interface. See the [IDiaPropertyStorage](../../debugger/debug-interface-access/idiapropertystorage.md) interface for an implementation of the `PrintPropertyStorage` function. For an alternative output, see the [IDiaInjectedSource](../../debugger/debug-interface-access/idiainjectedsource.md) interface.
45-
46-
```C++
47-
48-
IDiaEnumInjectedSources* GetEnumInjectedSources(IDiaSession *pSession)
49-
{
50-
IDiaEnumInjectedSources* pUnknown = NULL;
51-
REFIID iid = __uuidof(IDiaEnumInjectedSources);
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-
void DumpAllInjectedSources( IDiaSession* pSession)
76-
{
77-
IDiaEnumInjectedSources* pEnumInjSources;
78-
79-
pEnumInjSources = GetEnumInjectedSources(pSession);
80-
if (pEnumInjSources != NULL)
81-
{
82-
IDiaInjectedSource* pInjSource;
83-
ULONG celt = 0;
84-
85-
while(pEnumInjSources->Next(1, &pInjSource, &celt) == S_OK &&
86-
celt == 1)
87-
{
88-
IDiaPropertyStorage *pPropertyStorage;
89-
if (pInjSource->QueryInterface(__uuidof(IDiaPropertyStorage),
90-
(void **)&pPropertyStorage) == S_OK)
91-
{
92-
PrintPropertyStorage(pPropertyStorage);
93-
pPropertyStorage->Release();
94-
}
95-
pInjSource->Release();
96-
}
97-
pEnumInjSources->Release();
98-
}
99-
}
100-
```
101-
102-
## Requirements
103-
Header: Dia2.h
104-
105-
Library: diaguids.lib
106-
107-
DLL: msdia80.dll
108-
109-
## See Also
110-
[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
111-
[IDiaSession::findInjectedSource](../../debugger/debug-interface-access/idiasession-findinjectedsource.md)
112-
[IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md)
113-
[IDiaPropertyStorage](../../debugger/debug-interface-access/idiapropertystorage.md)
114-
[IDiaInjectedSource](../../debugger/debug-interface-access/idiainjectedsource.md)
17+
Enumerate the various injected sources contained in the data source.
18+
19+
## Syntax
20+
21+
```
22+
IDiaEnumInjectedSources : IUnknown
23+
```
24+
25+
## Methods in Vtable Order
26+
The following table shows the methods of `IDiaEnumInjectedSources`.
27+
28+
|Method|Description|
29+
|------------|-----------------|
30+
|[IDiaEnumInjectedSources::get__NewEnum](../../debugger/debug-interface-access/idiaenuminjectedsources-get-newenum.md)|Retrieves the [IEnumVARIANT Interface](/previous-versions/windows/desktop/api/oaidl/nn-oaidl-ienumvariant) version of this enumerator.|
31+
|[IDiaEnumInjectedSources::get_Count](../../debugger/debug-interface-access/idiaenuminjectedsources-get-count.md)|Retrieves the number of injected sources.|
32+
|[IDiaEnumInjectedSources::Item](../../debugger/debug-interface-access/idiaenuminjectedsources-item.md)|Retrieves an injected source by means of an index.|
33+
|[IDiaEnumInjectedSources::Next](../../debugger/debug-interface-access/idiaenuminjectedsources-next.md)|Retrieves a specified number of injected sources in the enumeration sequence.|
34+
|[IDiaEnumInjectedSources::Skip](../../debugger/debug-interface-access/idiaenuminjectedsources-skip.md)|Skips a specified number of injected sources in an enumeration sequence.|
35+
|[IDiaEnumInjectedSources::Reset](../../debugger/debug-interface-access/idiaenuminjectedsources-reset.md)|Resets an enumeration sequence to the beginning.|
36+
|[IDiaEnumInjectedSources::Clone](../../debugger/debug-interface-access/idiaenuminjectedsources-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.|
37+
38+
## Remarks
39+
40+
## Notes for Callers
41+
This interface is obtained by calling the [IDiaSession::findInjectedSource](../../debugger/debug-interface-access/idiasession-findinjectedsource.md) method with the name of a specific source file or by calling the [IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md) method with the GUID of the `IDiaEnumInjectedSources` interface.
42+
43+
## Example
44+
This example shows how to obtain (the `GetEnumInjectedSources` function) and use (the `DumpAllInjectedSources` function) the `IDiaEnumInjectedSources` interface. See the [IDiaPropertyStorage](../../debugger/debug-interface-access/idiapropertystorage.md) interface for an implementation of the `PrintPropertyStorage` function. For an alternative output, see the [IDiaInjectedSource](../../debugger/debug-interface-access/idiainjectedsource.md) interface.
45+
46+
```C++
47+
48+
IDiaEnumInjectedSources* GetEnumInjectedSources(IDiaSession *pSession)
49+
{
50+
IDiaEnumInjectedSources* pUnknown = NULL;
51+
REFIID iid = __uuidof(IDiaEnumInjectedSources);
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+
void DumpAllInjectedSources( IDiaSession* pSession)
76+
{
77+
IDiaEnumInjectedSources* pEnumInjSources;
78+
79+
pEnumInjSources = GetEnumInjectedSources(pSession);
80+
if (pEnumInjSources != NULL)
81+
{
82+
IDiaInjectedSource* pInjSource;
83+
ULONG celt = 0;
84+
85+
while(pEnumInjSources->Next(1, &pInjSource, &celt) == S_OK &&
86+
celt == 1)
87+
{
88+
IDiaPropertyStorage *pPropertyStorage;
89+
if (pInjSource->QueryInterface(__uuidof(IDiaPropertyStorage),
90+
(void **)&pPropertyStorage) == S_OK)
91+
{
92+
PrintPropertyStorage(pPropertyStorage);
93+
pPropertyStorage->Release();
94+
}
95+
pInjSource->Release();
96+
}
97+
pEnumInjSources->Release();
98+
}
99+
}
100+
```
101+
102+
## Requirements
103+
Header: Dia2.h
104+
105+
Library: diaguids.lib
106+
107+
DLL: msdia80.dll
108+
109+
## See Also
110+
[Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
111+
[IDiaSession::findInjectedSource](../../debugger/debug-interface-access/idiasession-findinjectedsource.md)
112+
[IDiaSession::getEnumTables](../../debugger/debug-interface-access/idiasession-getenumtables.md)
113+
[IDiaPropertyStorage](../../debugger/debug-interface-access/idiapropertystorage.md)
114+
[IDiaInjectedSource](../../debugger/debug-interface-access/idiainjectedsource.md)

0 commit comments

Comments
 (0)