IVsDebugger2.LaunchDebugTargets2 Method
Launches or attaches to the specified processes under the control of the debugger.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣言
Function LaunchDebugTargets2 ( _
DebugTargetCount As UInteger, _
pDebugTargets As IntPtr _
) As Integer
'使用
Dim instance As IVsDebugger2
Dim DebugTargetCount As UInteger
Dim pDebugTargets As IntPtr
Dim returnValue As Integer
returnValue = instance.LaunchDebugTargets2(DebugTargetCount, _
pDebugTargets)
int LaunchDebugTargets2(
uint DebugTargetCount,
IntPtr pDebugTargets
)
int LaunchDebugTargets2(
[InAttribute] unsigned int DebugTargetCount,
[InAttribute] IntPtr pDebugTargets
)
function LaunchDebugTargets2(
DebugTargetCount : uint,
pDebugTargets : IntPtr
) : int
Parameters
DebugTargetCount
Type: System.UInt32[in] Number of targets to launch (specifies the number of VsDebugTargetInfo2 structures pointed to by pDebugTargets).
pDebugTargets
Type: System.IntPtr[in, out] Array of VsDebugTargetInfo2 structures describing the programs to launch or attach to.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell80.idl:
HRESULT IVsDebugger2::LaunchDebugTargets2(
[in] ULONG DebugTargetCount,
[in, out, size_is(DebugTargetCount)] VsDebugTargetInfo2* pDebugTargets
);
This is the method called by the DebugLaunch method to perform the launch. This indirection gives DebugLaunch a chance to make changes or additions to the debug launch cycle before launching the debugger. For example, one addition would be adding custom debug engines to launch with the process.
Note
An example implementation of DebugLaunch and how it uses IvsDebugger::LaunchDebugTargets can be found in the My C Package sample.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.