Compartir a través de


IVsLaunchPad2.ExecCommandEx Method

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

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

Syntax

'Declaración
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, _
    <OutAttribute> pdwProcessExitCode As UInteger(), _
    <OutAttribute> pbstrOutput As String() _
) As Integer
'Uso
Dim instance As IVsLaunchPad2
Dim pszApplicationName As String
Dim pszCommandLine As String
Dim pszWorkingDir As String
Dim lpf As UInteger
Dim pOutputWindowPane As IVsOutputWindowPane
Dim nTaskItemCategory As UInteger
Dim nTaskItemBitmap As UInteger
Dim pszTaskListSubcategory As String
Dim pVsLaunchPadEvents As IVsLaunchPadEvents
Dim pOutputParser As IVsLaunchPadOutputParser
Dim pdwProcessExitCode As UInteger()
Dim pbstrOutput As String()
Dim returnValue As Integer

returnValue = instance.ExecCommandEx(pszApplicationName, _
    pszCommandLine, pszWorkingDir, lpf, _
    pOutputWindowPane, nTaskItemCategory, _
    nTaskItemBitmap, pszTaskListSubcategory, _
    pVsLaunchPadEvents, pOutputParser, _
    pdwProcessExitCode, pbstrOutput)
int ExecCommandEx(
    string pszApplicationName,
    string pszCommandLine,
    string pszWorkingDir,
    uint lpf,
    IVsOutputWindowPane pOutputWindowPane,
    uint nTaskItemCategory,
    uint nTaskItemBitmap,
    string pszTaskListSubcategory,
    IVsLaunchPadEvents pVsLaunchPadEvents,
    IVsLaunchPadOutputParser pOutputParser,
    uint[] pdwProcessExitCode,
    string[] pbstrOutput
)
int ExecCommandEx(
    [InAttribute] String^ pszApplicationName, 
    [InAttribute] String^ pszCommandLine, 
    [InAttribute] String^ pszWorkingDir, 
    [InAttribute] unsigned int lpf, 
    [InAttribute] IVsOutputWindowPane^ pOutputWindowPane, 
    [InAttribute] unsigned int nTaskItemCategory, 
    [InAttribute] unsigned int nTaskItemBitmap, 
    [InAttribute] String^ pszTaskListSubcategory, 
    [InAttribute] IVsLaunchPadEvents^ pVsLaunchPadEvents, 
    [InAttribute] IVsLaunchPadOutputParser^ pOutputParser, 
    [OutAttribute] array<unsigned int>^ pdwProcessExitCode, 
    [OutAttribute] array<String^>^ pbstrOutput
)
abstract ExecCommandEx : 
        pszApplicationName:string * 
        pszCommandLine:string * 
        pszWorkingDir:string * 
        lpf:uint32 * 
        pOutputWindowPane:IVsOutputWindowPane * 
        nTaskItemCategory:uint32 * 
        nTaskItemBitmap:uint32 * 
        pszTaskListSubcategory:string * 
        pVsLaunchPadEvents:IVsLaunchPadEvents * 
        pOutputParser:IVsLaunchPadOutputParser * 
        pdwProcessExitCode:uint32[] byref * 
        pbstrOutput:string[] byref -> int 
function ExecCommandEx(
    pszApplicationName : String, 
    pszCommandLine : String, 
    pszWorkingDir : String, 
    lpf : uint, 
    pOutputWindowPane : IVsOutputWindowPane, 
    nTaskItemCategory : uint, 
    nTaskItemBitmap : uint, 
    pszTaskListSubcategory : String, 
    pVsLaunchPadEvents : IVsLaunchPadEvents, 
    pOutputParser : IVsLaunchPadOutputParser, 
    pdwProcessExitCode : uint[], 
    pbstrOutput : String[]
) : int

Parameters

  • pszApplicationName
    Type: System.String
    [in] Application name that is passed to CreateProcess by the environment.
  • pszCommandLine
    Type: System.String
    [in] Command line string that is passed to CreateProcess by the environment.
  • pszWorkingDir
    Type: System.String
    [in] Working directory that is passed to CreateProcess by the environment. Can be nulla null reference (Nothing in Visual Basic).
  • pdwProcessExitCode
    Type: array<System.UInt32[]
    [out] Value returned by process.
  • pbstrOutput
    Type: array<System.String[]
    [out] All output that was generated. Can be nulla null reference (Nothing in Visual Basic).

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 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
);

.NET Framework Security

See Also

Reference

IVsLaunchPad2 Interface

IVsLaunchPad2 Members

Microsoft.VisualStudio.Shell.Interop Namespace