Compartir a través de


IVsLaunchPadFactory.CreateLaunchPad Method

Creates an IVsLaunchPad object that can be used to spawn command line tools and batch files.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaración
Function CreateLaunchPad ( _
    <OutAttribute> ByRef ppLaunchPad As IVsLaunchPad _
) As Integer
'Uso
Dim instance As IVsLaunchPadFactory
Dim ppLaunchPad As IVsLaunchPad
Dim returnValue As Integer

returnValue = instance.CreateLaunchPad(ppLaunchPad)
int CreateLaunchPad(
    out IVsLaunchPad ppLaunchPad
)
int CreateLaunchPad(
    [OutAttribute] IVsLaunchPad^% ppLaunchPad
)
abstract CreateLaunchPad : 
        ppLaunchPad:IVsLaunchPad byref -> int 
function CreateLaunchPad(
    ppLaunchPad : IVsLaunchPad
) : int

Parameters

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 vsshell.idl:

HRESULT IVsLaunchPadFactory::CreateLaunchPad(
   [out] IVsLaunchPad **ppLaunchPad
);

This method creates an IVsLaunchPad object that can be used to spawn command line tools and batch files. The IVsLaunchPad object handles the chores of piping output to the output window and of allowing the user to cancel. If the user cancels, it kills the spawned process.

Some project systems will use this functionality to implement StartBuild.

It is specifically possible to create an IVsLaunchPad object on a background builder thread. In order to do this, the project system should QueryService for the SVsLaunchPadFactory service from the main UI thread. It should pass the IVsLaunchPadFactory interface unmarshalled to their builder thread and then call IVsLaunchPadFactory::CreateLaunchPad from the builder thread in order to create the object on the builder thread.

Nota

This does slightly bend the marshalling rules of COM but is necessary to get the LaunchPad object created on the proper thread. The IVsLaunchPad object returned is an Apartment Model object.

.NET Framework Security

See Also

Reference

IVsLaunchPadFactory Interface

IVsLaunchPadFactory Members

Microsoft.VisualStudio.Shell.Interop Namespace