Compartilhar via


IVsLaunchPad2.ExecCommandEx Method

Definition

Executes a command with output displayed to an output pane in the IDE and parses the output string in a specified format.

int ExecCommandEx(std::wstring const & pszApplicationName, std::wstring const & pszCommandLine, std::wstring const & pszWorkingDir, unsigned int lpf, Microsoft::VisualStudio::Shell::Interop::IVsOutputWindowPane const & pOutputWindowPane, unsigned int nTaskItemCategory, unsigned int nTaskItemBitmap, std::wstring const & pszTaskListSubcategory, Microsoft::VisualStudio::Shell::Interop::IVsLaunchPadEvents const & pVsLaunchPadEvents, Microsoft::VisualStudio::Shell::Interop::IVsLaunchPadOutputParser const & pOutputParser, std::Array <unsigned int> const & pdwProcessExitCode, std::Array <std::wstring const &> const & pbstrOutput);
public int ExecCommandEx (string pszApplicationName, string pszCommandLine, string pszWorkingDir, uint lpf, Microsoft.VisualStudio.Shell.Interop.IVsOutputWindowPane pOutputWindowPane, uint nTaskItemCategory, uint nTaskItemBitmap, string pszTaskListSubcategory, Microsoft.VisualStudio.Shell.Interop.IVsLaunchPadEvents pVsLaunchPadEvents, Microsoft.VisualStudio.Shell.Interop.IVsLaunchPadOutputParser pOutputParser, uint[] pdwProcessExitCode, string[] pbstrOutput);
abstract member ExecCommandEx : string * string * string * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsOutputWindowPane * uint32 * uint32 * string * Microsoft.VisualStudio.Shell.Interop.IVsLaunchPadEvents * Microsoft.VisualStudio.Shell.Interop.IVsLaunchPadOutputParser * uint32[] * string[] -> int
Public Function ExecCommandEx (pszApplicationName As String, pszCommandLine As String, pszWorkingDir As String, lpf As UInteger, pOutputWindowPane As IVsOutputWindowPane, nTaskItemCategory As UInteger, nTaskItemBitmap As UInteger, pszTaskListSubcategory As String, pVsLaunchPadEvents As IVsLaunchPadEvents, pOutputParser As IVsLaunchPadOutputParser, Optional pdwProcessExitCode As UInteger(), Optional pbstrOutput As String()) As Integer

Parameters

pszApplicationName
String

[in] Application name that is passed to CreateProcess by the environment.

pszCommandLine
String

[in] Command line string that is passed to CreateProcess by the environment.

pszWorkingDir
String

[in] Working directory that is passed to CreateProcess by the environment. Can be null.

lpf
UInt32

[in] Launch pad flags. All existing values are taken from the _LAUNCHPAD_FLAGS enumeration and all the new values are from _LAUNCHPAD_FLAGS2 enumeration

pOutputWindowPane
IVsOutputWindowPane

[in] Pointer to the IVsOutputWindowPane interface created by CreatePane(Guid, String, Int32, Int32).

nTaskItemCategory
UInt32

[in] Task item category, if lpf is set to LPF_PipeStdoutToTaskList. Values are taken from the VSTASKCATEGORY enumeration.

nTaskItemBitmap
UInt32

[in] Task item bitmap, if lpf is set to LPF_PipeStdoutToTaskList.

pszTaskListSubcategory
String

[in] Task list subcategory, if lpf is set to LPF_PipeStdoutToTaskList.

pVsLaunchPadEvents
IVsLaunchPadEvents

[in] Pointer to the IVsLaunchPadEvents interface

pOutputParser
IVsLaunchPadOutputParser

[in] Callback for parsing of information from output (may be null).

pdwProcessExitCode
UInt32[]

[out] Value returned by process.

pbstrOutput
String[]

[out] All output that was generated. Can be null.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsLaunchPad2::ExecCommandEx(  
   [in] LPCOLESTR pszApplicationName,  
   [in] LPCOLESTR pszCommandLine,  
   [in] LPCOLESTR pszWorkingDir,  
   [in] LAUNCHPAD_FLAGS2 lpf,  
   [in] IVsOutputWindowPane *pOutputWindowPane,  
   [in] ULONG nTaskItemCategory,  
   [in] ULONG nTaskItemBitmap,  
   [in] LPCOLESTR pszTaskListSubcategory,  
   [in] IVsLaunchPadEvents *pVsLaunchPadEvents,  
   [in] IVsLaunchPadOutputParser *pOutputParser,  
   [out] DWORD *pdwProcessExitCode, [out] BSTR *pbstrOutput  
);  

Applies to