Udostępnij za pośrednictwem


IVsLaunchPadFactory.CreateLaunchPad(IVsLaunchPad) Method

Definition

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

public:
 int CreateLaunchPad([Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsLaunchPad ^ % ppLaunchPad);
public:
 int CreateLaunchPad([Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsLaunchPad ^ &  ppLaunchPad);
int CreateLaunchPad([Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsLaunchPad const & & ppLaunchPad);
public int CreateLaunchPad (out Microsoft.VisualStudio.Shell.Interop.IVsLaunchPad ppLaunchPad);
abstract member CreateLaunchPad : IVsLaunchPad -> int
Public Function CreateLaunchPad (ByRef ppLaunchPad As IVsLaunchPad) As Integer

Parameters

ppLaunchPad
IVsLaunchPad

[out] Pointer to a launch pad object.

Returns

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.

Note

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.

Applies to