|
2 | 2 | title: "BP_RESOLUTION_LOCATION | Microsoft Docs"
|
3 | 3 | ms.date: "11/04/2016"
|
4 | 4 | ms.topic: "conceptual"
|
5 |
| -f1_keywords: |
| 5 | +f1_keywords: |
6 | 6 | - "BP_RESOLUTION_LOCATION"
|
7 |
| -helpviewer_keywords: |
| 7 | +helpviewer_keywords: |
8 | 8 | - "BP_RESOLUTION_LOCATION structure"
|
9 | 9 | ms.assetid: 21dc5246-69c1-43e3-855c-9cd4e596c0e6
|
10 | 10 | author: "gregvanl"
|
11 | 11 | ms.author: "gregvanl"
|
12 | 12 | manager: jillfra
|
13 |
| -ms.workload: |
| 13 | +ms.workload: |
14 | 14 | - "vssdk"
|
15 | 15 | ---
|
16 | 16 | # BP_RESOLUTION_LOCATION
|
17 |
| -Specifies the structure of the breakpoint resolution location. |
18 |
| - |
19 |
| -## Syntax |
20 |
| - |
21 |
| -```cpp |
22 |
| -struct _BP_RESOLUTION_LOCATION { |
23 |
| - BP_TYPE bpType; |
24 |
| - union { |
25 |
| - BP_RESOLUTION_CODE bpresCode; |
26 |
| - BP_RESOLUTION_DATA bpresData; |
27 |
| - int unused; |
28 |
| - } bpResLocation; |
29 |
| -} BP_RESOLUTION_LOCATION; |
30 |
| -``` |
31 |
| - |
32 |
| -```csharp |
33 |
| -public struct BP_RESOLUTION_LOCATION { |
34 |
| - public uint bpType; |
35 |
| - public IntPtr unionmember1; |
36 |
| - public IntPtr unionmember2; |
37 |
| - public IntPtr unionmember3; |
38 |
| - public uint unionmember4; |
39 |
| -}; |
40 |
| -``` |
41 |
| - |
42 |
| -## Members |
43 |
| - `bpType` |
44 |
| - A value from the [BP_TYPE](../../../extensibility/debugger/reference/bp-type.md) enumeration that specifies how to interpret the `bpResLocation` union or `unionmemberX` members. |
45 |
| - |
46 |
| - `bpResLocation.bpresCode` |
47 |
| - [C++ only] Contains the [BP_RESOLUTION_CODE](../../../extensibility/debugger/reference/bp-resolution-code.md) structure if `bpType` = `BPT_CODE`. |
48 |
| - |
49 |
| - `bpResLocation.bpresData` |
50 |
| - [C++ only] Contains the [BP_RESOLUTION_DATA](../../../extensibility/debugger/reference/bp-resolution-data.md) structure if `bpType` = `BPT_DATA`. |
51 |
| - |
52 |
| - `bpResLocation.unused` |
53 |
| - [C++ only] A placeholder. |
54 |
| - |
55 |
| - `unionmember1` |
56 |
| - [C# only] See Remarks on how to interpret. |
57 |
| - |
58 |
| - `unionmember2` |
59 |
| - [C# only] See Remarks on how to interpret. |
60 |
| - |
61 |
| - `unionmember3` |
62 |
| - [C# only] See Remarks on how to interpret. |
63 |
| - |
64 |
| - `unionmember4` |
65 |
| - [C# only] See Remarks on how to interpret. |
66 |
| - |
67 |
| -## Remarks |
68 |
| - This structure is a member of the [BP_ERROR_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-error-resolution-info.md) and [BP_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-resolution-info.md) structures. |
69 |
| - |
70 |
| - [C# only] The `unionmemberX` members are interpreted according to the following table. Look down the left column for the `bpType` value then across to determine what each `unionmemberX` member represents and marshal the `unionmemberX` accordingly. See the Example for a way to interpret this structure in C#. |
71 |
| - |
72 |
| -|`bpLocationType`|`unionmember1`|`unionmember2`|`unionmember3`|`unionmember4`| |
73 |
| -|----------------------|--------------------|--------------------|--------------------|--------------------| |
74 |
| -|`BPT_CODE`|[IDebugCodeContext2](../../../extensibility/debugger/reference/idebugcodecontext2.md)|-|-|-| |
75 |
| -|`BPT_DATA`|`string` (data expression)|`string` (function name)|`string` (image name)|`enum_BP_RES_DATA_FLAGS`| |
76 |
| - |
77 |
| -## Example |
78 |
| - This example shows how to interpret the `BP_RESOLUTION_LOCATION` structure in C#. |
79 |
| - |
80 |
| -```csharp |
81 |
| -using System; |
82 |
| -using System.Runtime.Interop.Services; |
83 |
| -using Microsoft.VisualStudio.Debugger.Interop; |
84 |
| - |
85 |
| -namespace MyPackage |
86 |
| -{ |
87 |
| - public class MyClass |
88 |
| - { |
89 |
| - public void Interpret(BP_RESOLUTION_LOCATION bprl) |
90 |
| - { |
91 |
| - if (bprl.bpType == (uint)enum_BP_TYPE.BPT_CODE) |
92 |
| - { |
93 |
| - IDebugCodeContext2 pContext = (IDebugCodeContext2)Marshal.GetObjectForIUnknown(bp.unionmember1); |
94 |
| - } |
95 |
| - else if (bprl.bpType == (uint)enum_BP_TYPE.BPT_DATA) |
96 |
| - { |
97 |
| - string dataExpression = Marshal.PtrToStringBSTR(bp.unionmember3); |
98 |
| - string functionName = Marshal.PtrToStringBSTR(bp.unionmember2); |
99 |
| - string imageName = Marshal.PtrToStringBSTR(bp.unionmember3); |
100 |
| - enum_BP_RES_DATA_FLAGS numElements = (enum_BP_RES_DATA_FLAGS)bp.unionmember4; |
101 |
| - } |
102 |
| - } |
103 |
| - } |
104 |
| -} |
105 |
| -``` |
106 |
| - |
107 |
| -## Requirements |
108 |
| - Header: msdbg.h |
109 |
| - |
110 |
| - Namespace: Microsoft.VisualStudio.Debugger.Interop |
111 |
| - |
112 |
| - Assembly: Microsoft.VisualStudio.Debugger.Interop.dll |
113 |
| - |
114 |
| -## See Also |
115 |
| - [Structures and Unions](../../../extensibility/debugger/reference/structures-and-unions.md) |
116 |
| - [BP_TYPE](../../../extensibility/debugger/reference/bp-type.md) |
117 |
| - [BP_ERROR_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-error-resolution-info.md) |
118 |
| - [BP_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-resolution-info.md) |
119 |
| - [BP_RESOLUTION_CODE](../../../extensibility/debugger/reference/bp-resolution-code.md) |
120 |
| - [BP_RESOLUTION_DATA](../../../extensibility/debugger/reference/bp-resolution-data.md) |
121 |
| - [BP_RES_DATA_FLAGS](../../../extensibility/debugger/reference/bp-res-data-flags.md) |
| 17 | +Specifies the structure of the breakpoint resolution location. |
| 18 | + |
| 19 | +## Syntax |
| 20 | + |
| 21 | +```cpp |
| 22 | +struct _BP_RESOLUTION_LOCATION { |
| 23 | + BP_TYPE bpType; |
| 24 | + union { |
| 25 | + BP_RESOLUTION_CODE bpresCode; |
| 26 | + BP_RESOLUTION_DATA bpresData; |
| 27 | + int unused; |
| 28 | + } bpResLocation; |
| 29 | +} BP_RESOLUTION_LOCATION; |
| 30 | +``` |
| 31 | +
|
| 32 | +```csharp |
| 33 | +public struct BP_RESOLUTION_LOCATION { |
| 34 | + public uint bpType; |
| 35 | + public IntPtr unionmember1; |
| 36 | + public IntPtr unionmember2; |
| 37 | + public IntPtr unionmember3; |
| 38 | + public uint unionmember4; |
| 39 | +}; |
| 40 | +``` |
| 41 | + |
| 42 | +## Members |
| 43 | +`bpType` |
| 44 | +A value from the [BP_TYPE](../../../extensibility/debugger/reference/bp-type.md) enumeration that specifies how to interpret the `bpResLocation` union or `unionmemberX` members. |
| 45 | + |
| 46 | +`bpResLocation.bpresCode` |
| 47 | +[C++ only] Contains the [BP_RESOLUTION_CODE](../../../extensibility/debugger/reference/bp-resolution-code.md) structure if `bpType` = `BPT_CODE`. |
| 48 | + |
| 49 | +`bpResLocation.bpresData` |
| 50 | +[C++ only] Contains the [BP_RESOLUTION_DATA](../../../extensibility/debugger/reference/bp-resolution-data.md) structure if `bpType` = `BPT_DATA`. |
| 51 | + |
| 52 | +`bpResLocation.unused` |
| 53 | +[C++ only] A placeholder. |
| 54 | + |
| 55 | +`unionmember1` |
| 56 | +[C# only] See Remarks on how to interpret. |
| 57 | + |
| 58 | +`unionmember2` |
| 59 | +[C# only] See Remarks on how to interpret. |
| 60 | + |
| 61 | +`unionmember3` |
| 62 | +[C# only] See Remarks on how to interpret. |
| 63 | + |
| 64 | +`unionmember4` |
| 65 | +[C# only] See Remarks on how to interpret. |
| 66 | + |
| 67 | +## Remarks |
| 68 | +This structure is a member of the [BP_ERROR_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-error-resolution-info.md) and [BP_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-resolution-info.md) structures. |
| 69 | + |
| 70 | +[C# only] The `unionmemberX` members are interpreted according to the following table. Look down the left column for the `bpType` value then across to determine what each `unionmemberX` member represents and marshal the `unionmemberX` accordingly. See the Example for a way to interpret this structure in C#. |
| 71 | + |
| 72 | +|`bpLocationType`|`unionmember1`|`unionmember2`|`unionmember3`|`unionmember4`| |
| 73 | +|----------------------|--------------------|--------------------|--------------------|--------------------| |
| 74 | +|`BPT_CODE`|[IDebugCodeContext2](../../../extensibility/debugger/reference/idebugcodecontext2.md)|-|-|-| |
| 75 | +|`BPT_DATA`|`string` (data expression)|`string` (function name)|`string` (image name)|`enum_BP_RES_DATA_FLAGS`| |
| 76 | + |
| 77 | +## Example |
| 78 | +This example shows how to interpret the `BP_RESOLUTION_LOCATION` structure in C#. |
| 79 | + |
| 80 | +```csharp |
| 81 | +using System; |
| 82 | +using System.Runtime.Interop.Services; |
| 83 | +using Microsoft.VisualStudio.Debugger.Interop; |
| 84 | + |
| 85 | +namespace MyPackage |
| 86 | +{ |
| 87 | + public class MyClass |
| 88 | + { |
| 89 | + public void Interpret(BP_RESOLUTION_LOCATION bprl) |
| 90 | + { |
| 91 | + if (bprl.bpType == (uint)enum_BP_TYPE.BPT_CODE) |
| 92 | + { |
| 93 | + IDebugCodeContext2 pContext = (IDebugCodeContext2)Marshal.GetObjectForIUnknown(bp.unionmember1); |
| 94 | + } |
| 95 | + else if (bprl.bpType == (uint)enum_BP_TYPE.BPT_DATA) |
| 96 | + { |
| 97 | + string dataExpression = Marshal.PtrToStringBSTR(bp.unionmember3); |
| 98 | + string functionName = Marshal.PtrToStringBSTR(bp.unionmember2); |
| 99 | + string imageName = Marshal.PtrToStringBSTR(bp.unionmember3); |
| 100 | + enum_BP_RES_DATA_FLAGS numElements = (enum_BP_RES_DATA_FLAGS)bp.unionmember4; |
| 101 | + } |
| 102 | + } |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | + |
| 107 | +## Requirements |
| 108 | +Header: msdbg.h |
| 109 | + |
| 110 | +Namespace: Microsoft.VisualStudio.Debugger.Interop |
| 111 | + |
| 112 | +Assembly: Microsoft.VisualStudio.Debugger.Interop.dll |
| 113 | + |
| 114 | +## See Also |
| 115 | +[Structures and Unions](../../../extensibility/debugger/reference/structures-and-unions.md) |
| 116 | +[BP_TYPE](../../../extensibility/debugger/reference/bp-type.md) |
| 117 | +[BP_ERROR_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-error-resolution-info.md) |
| 118 | +[BP_RESOLUTION_INFO](../../../extensibility/debugger/reference/bp-resolution-info.md) |
| 119 | +[BP_RESOLUTION_CODE](../../../extensibility/debugger/reference/bp-resolution-code.md) |
| 120 | +[BP_RESOLUTION_DATA](../../../extensibility/debugger/reference/bp-resolution-data.md) |
| 121 | +[BP_RES_DATA_FLAGS](../../../extensibility/debugger/reference/bp-res-data-flags.md) |
0 commit comments