Skip to content

Commit 23afb22

Browse files
committed
IDiaEnumSourceLink
1 parent e9d3be7 commit 23afb22

13 files changed

+499
-32
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description: Creates an enumerator that contains the same enumeration state as the current source files enumerator.
3+
title: "IDiaEnumSourceLink::Clone"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink::Clone method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink::Clone`
17+
18+
Creates an enumerator that contains the same enumeration state as the current enumerator.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Clone(
24+
IDiaEnumSourceLink** ppenum
25+
);
26+
```
27+
28+
#### Parameters
29+
30+
`ppenum`
31+
32+
[out] Returns an [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md) object that contains a duplicate of the enumerator. The source link blobs are not duplicated, only the enumerator.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns an error code.
37+
38+
## See also
39+
40+
- [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description: Retrieves the number of source files.
3+
title: "IDiaEnumSourceLink::Count"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink::Count method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink::Count`
17+
18+
Retrieves the number of source link blobs.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Count(
24+
DWORD* pRetVal
25+
);
26+
```
27+
28+
#### Parameters
29+
30+
`pRetVal`
31+
32+
[out] Returns the number of source link blobs.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns an error code.
37+
38+
## See also
39+
40+
- [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
description: Retrieves the next source link blob and advances the enumeration.
3+
title: "IDiaEnumSourceLink::Next"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink::Next method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink::Next`
17+
18+
Retrieves the next source link blob and advances the enumeration.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Next(
24+
DWORD cb,
25+
DWORD* pcb,
26+
BYTE* pb
27+
);
28+
```
29+
30+
#### Parameters
31+
32+
`cb`
33+
34+
[in] Specifies the number of bytes in the buffer `pb`. This should never be 0.
35+
36+
`pcb`
37+
38+
[out, optional] Returns the number of bytes written to the buffer `pb` upon success.
39+
40+
`pb`
41+
42+
[out] Returns the bytes for next source link blob.
43+
44+
## Return Value
45+
46+
If successful, returns `S_OK`. If the end of the enumeration has been reached, returns `S_FALSE`. Otherwise, returns an error code. Note that this function does **not** return an error code if `pb` is too small to return the entire source link blob, it merely silently truncates the blob. The caller should always ensure the buffer is big enough and `cb` specifies the correct size of the buffer. Call the [`IDiaEnumSourceLink::SizeOfNext`](../../debugger/debug-interface-access/idiaenumsourcelink-sizeofnext.md) method to get the needed buffer size.
47+
48+
## See also
49+
50+
- [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md)
51+
- [`IDiaEnumSourceLink::SizeOfNext`](../../debugger/debug-interface-access/idiaenumsourcelink-sizeofnext.md)
52+
- [`IDiaEnumSourceLink2::Next2`](../../debugger/debug-interface-access/idiaenumsourcelink2-next2.md)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
description: Resets an enumeration sequence of source files to the beginning.
3+
title: "IDiaEnumSourceLink::Reset"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink::Reset method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink::Reset`
17+
18+
Resets an enumeration sequence to the beginning.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Reset();
24+
```
25+
26+
## Return Value
27+
28+
Returns `S_OK`.
29+
30+
## See also
31+
32+
- [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
description: Retrieves the size of the next source link blob, without advancing the enumeration.
3+
title: "IDiaEnumSourceLink::SizeOfNext"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink::SizeOfNext method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink::SizeOfNext`
17+
18+
Retrieves the size of the next source link blob, without advancing the enumeration.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT SizeOfNext(
24+
DWORD* pRetVal
25+
);
26+
```
27+
28+
#### Parameters
29+
30+
`pRetVal`
31+
32+
[out] Returns the size of the next source link blob.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns an error code.
37+
38+
## See also
39+
40+
- [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md)
41+
- [`IDiaEnumSourceLink2::SizeOfNext2`](../../debugger/debug-interface-access/idiaenumsourcelink2-sizeofnext2.md)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
description: Skips a specified number of source link blobs in an enumeration sequence.
3+
title: "IDiaEnumSourceLink::Skip"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink::Skip method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink::Skip`
17+
18+
Skips a specified number of source link blobs in an enumeration sequence.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Skip(
24+
DWORD cnt
25+
);
26+
```
27+
28+
#### Parameters
29+
30+
`cnt`
31+
32+
[in] The number of source link blobs in the enumeration sequence to skip.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns `S_FALSE` if there are no more source link blobs to skip.
37+
38+
## See also
39+
40+
- [`IDiaEnumSourceLink`](../../debugger/debug-interface-access/idiaenumsourcelink.md)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
description: Enumerates the various source link blobs contained in the data source.
3+
title: IDiaEnumSourceLink
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink interface"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# IDiaEnumSourceLink
17+
18+
Enumerates the various source link blobs contained in the data source.
19+
20+
## Syntax
21+
22+
`IDiaEnumSourceLink : IUnknown`
23+
24+
## Methods in Vtable Order
25+
26+
The following table shows the methods of `IDiaEnumSourceLink`.
27+
28+
|Method|Description|
29+
|------------|-----------------|
30+
|[`IDiaEnumSourceLink::Count`](../../debugger/debug-interface-access/idiaenumsourcelink-count.md)|Retrieves the number of source link blobs.|
31+
|[`IDiaEnumSourceLink::SizeOfNext`](../../debugger/debug-interface-access/idiaenumsourcelink-sizeofnext.md)|Retrieves the size of the next source link blob, without advancing the enumeration.|
32+
|[`IDiaEnumSourceLink::Next`](../../debugger/debug-interface-access/idiaenumsourcelink-next.md)|Retrieves the next source link blob and advances the enumeration.|
33+
|[`IDiaEnumSourceLink::Skip`](../../debugger/debug-interface-access/idiaenumsourcelink-skip.md)|Skips a specified number of source link blobs in an enumeration sequence.|
34+
|[`IDiaEnumSourceLink::Reset`](../../debugger/debug-interface-access/idiaenumsourcelink-reset.md)|Resets an enumeration sequence to the beginning.|
35+
|[`IDiaEnumSourceLink::Clone`](../../debugger/debug-interface-access/idiaenumsourcelink-clone.md)|Creates an enumerator that contains the same enumeration state as the current enumerator.|
36+
37+
## Remarks
38+
39+
Although [Source Link](https://github.com/dotnet/designs/blob/master/accepted/2020/diagnostics/source-link.md) is a well defined standard, the PDB and DIA SDK only have limited support for it. Specifically the DIA SDK treats the source link as a simple blob of bytes. It is the responsiblity of the caller to interpret those bytes as the correct character encoding (UTF8, ASCII, etc.), parse as a JSON file, enforce a particular schema, or use that information to map and download individual source files.
40+
41+
## Notes for Callers
42+
43+
Obtain this interface by calling the [`IDiaSessionEx::getSourceLinkInfo`](../../debugger/debug-interface-access/idiasessionex-getsourcelinkinfo.md) method.
44+
45+
## See also
46+
47+
- [Interfaces (Debug Interface Access SDK)](../../debugger/debug-interface-access/interfaces-debug-interface-access-sdk.md)
48+
- [`IDiaSessionEx::getSourceLinkInfo`](../../debugger/debug-interface-access/idiasessionex-getsourcelinkinfo.md)
49+
- [Source Link](https://github.com/dotnet/designs/blob/master/accepted/2020/diagnostics/source-link.md)
50+
- [Using Source Link](https://github.com/dotnet/sourcelink#using-source-link-in-c-projects)
51+
- [/SOURCELINK (Include Source Link file in PDB)](/cpp/build/reference/sourcelink)
52+
- [`IDiaEnumSourceLink2`](../../debugger/debug-interface-access/idiaenumsourcelink2.md)
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
description: Retrieves the next source link blob and advances the enumeration.
3+
title: "IDiaEnumSourceLink2::Next2"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink2::Next2 method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink2::Next2`
17+
18+
Retrieves the next source link blob and advances the enumeration.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT Next(
24+
ULONGLONG cb,
25+
ULONGLONG* pcb,
26+
BYTE* pb
27+
);
28+
```
29+
30+
#### Parameters
31+
32+
`cb`
33+
34+
[in] Specifies the number of bytes in the buffer `pb`. This should never be 0.
35+
36+
`pcb`
37+
38+
[out, optional] Returns the number of bytes written to the buffer `pb` upon success.
39+
40+
`pb`
41+
42+
[out] Returns the bytes for next source link blob.
43+
44+
## Return Value
45+
46+
If successful, returns `S_OK`. If the end of the enumeration has been reached, returns `S_FALSE`. Otherwise, returns an error code. Note that this function does **not** return an error code if `pb` is too small to return the entire source link blob, it merely silently truncates the blob. The caller should always ensure the buffer is big enough and `cb` specifies the correct size of the buffer. Call the [`IDiaEnumSourceLink2::SizeOfNext2`](../../debugger/debug-interface-access/idiaenumsourcelink2-sizeofnext2.md) method to get the needed buffer size.
47+
48+
## See also
49+
50+
- [`IDiaEnumSourceLink2`](../../debugger/debug-interface-access/idiaenumsourcelink2.md)
51+
- [`IDiaEnumSourceLink2::SizeOfNext2`](../../debugger/debug-interface-access/idiaenumsourcelink-sizeofnext.md)
52+
- [`IDiaEnumSourceLink::Next`](../../debugger/debug-interface-access/idiaenumsourcelink-next.md)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
description: Retrieves the size of the next source link blob, without advancing the enumeration.
3+
title: "IDiaEnumSourceLink2::SizeOfNext2"
4+
ms.date: "07/18/2024"
5+
ms.topic: "reference"
6+
dev_langs:
7+
- "C++"
8+
helpviewer_keywords:
9+
- "IDiaEnumSourceLink2::SizeOfNext2 method"
10+
author: "grantri"
11+
ms.author: "grantri"
12+
manager: twhitney
13+
ms.subservice: debug-diagnostics
14+
---
15+
16+
# `IDiaEnumSourceLink2::SizeOfNext2`
17+
18+
Retrieves the size of the next source link blob, without advancing the enumeration.
19+
20+
## Syntax
21+
22+
```c++
23+
HRESULT SizeOfNext(
24+
ULONGLONG* pRetVal
25+
);
26+
```
27+
28+
#### Parameters
29+
30+
`pRetVal`
31+
32+
[out] Returns the size of the next source link blob.
33+
34+
## Return Value
35+
36+
If successful, returns `S_OK`; otherwise, returns an error code.
37+
38+
## See also
39+
40+
- [`IDiaEnumSourceLink2`](../../debugger/debug-interface-access/idiaenumsourcelink2.md)
41+
- [`IDiaEnumSourceLink::SizeOfNext`](../../debugger/debug-interface-access/idiaenumsourcelink-sizeofnext.md)

0 commit comments

Comments
 (0)