Método IVsLaunchPad.ExecCommand (String, String, String, UInt32, IVsOutputWindowPane, UInt32, UInt32, String, IVsLaunchPadEvents, UInt32, String )

 

Executa um comando com a saída enviada por pipe para um painel de saída no IDE.

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

Sintaxe

int ExecCommand(
    string pszApplicationName,
    string pszCommandLine,
    string pszWorkingDir,
    uint lpf,
    IVsOutputWindowPane pOutputWindowPane,
    uint nTaskItemCategory,
    uint nTaskItemBitmap,
    string pszTaskListSubcategory,
    IVsLaunchPadEvents pVsLaunchPadEvents,
    out uint pdwProcessExitCode,
    string[] pbstrOutput
)
int ExecCommand(
    String^ pszApplicationName,
    String^ pszCommandLine,
    String^ pszWorkingDir,
    unsigned int lpf,
    IVsOutputWindowPane^ pOutputWindowPane,
    unsigned int nTaskItemCategory,
    unsigned int nTaskItemBitmap,
    String^ pszTaskListSubcategory,
    IVsLaunchPadEvents^ pVsLaunchPadEvents,
    [OutAttribute] unsigned int% pdwProcessExitCode,
    array<String^>^ pbstrOutput
)
abstract ExecCommand : 
        pszApplicationName:string *
        pszCommandLine:string *
        pszWorkingDir:string *
        lpf:uint32 *
        pOutputWindowPane:IVsOutputWindowPane *
        nTaskItemCategory:uint32 *
        nTaskItemBitmap:uint32 *
        pszTaskListSubcategory:string *
        pVsLaunchPadEvents:IVsLaunchPadEvents *
        pdwProcessExitCode:uint32 byref *
        pbstrOutput:string[] -> int
Function ExecCommand (
    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,
    <OutAttribute> ByRef pdwProcessExitCode As UInteger,
    pbstrOutput As String()
) As Integer

Parâmetros

  • pszApplicationName
    [in] Nome do aplicativo que é passado para CreateProcess pelo ambiente.Para obter mais informações, consulte CreateProcess.
  • pszCommandLine
    [in] Seqüência de caracteres de linha de comando que é passada para CreateProcess pelo ambiente.
  • pszWorkingDir
    [in] Diretório de trabalho que é passado para CreateProcess pelo ambiente.Can be null.
  • lpf
    [in] Sinalizadores de ponto de partida.Valores são obtidas a partir do _LAUNCHPAD_FLAGS enumeração.
  • pdwProcessExitCode
    [out] Valor retornado pelo processo.
  • pbstrOutput
    [out] true se toda a saída foi gerada.Can be null.

Valor de retorno

Type: System.Int32

Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De vsshell.idl:

HRESULT IVsLaunchPad::ExecCommand(
   [in] LPCOLESTR pszApplicationName,
   [in] LPCOLESTR pszCommandLine,
   [in] LPCOLESTR pszWorkingDir,
   [in] LAUNCHPAD_FLAGS lpf,
   [in] IVsOutputWindowPane *pOutputWindowPane,
   [in] ULONG nTaskItemCategory,
   [in] ULONG nTaskItemBitmap,
   [in] LPCOLESTR pszTaskListSubcategory,
   [in] IVsLaunchPadEvents *pVsLaunchPadEvents,
   [out] DWORD *pdwProcessExitCode,
   [out] BSTR *pbstrOutput
);

Se ExecBatchScript é chamado com lpf definido comoLPF_PipeStdoutToOutputWindow | LPF_PipeStdoutToTaskList, ExecBatchScript internally calls ParseOutputStringForTaskItem.Isso significa que qualquer saída gerada pelo pszApplicationName deve atender os requisitos de formato de ParseOutputStringForTaskItem.

Consulte também

Interface IVsLaunchPad
Namespace Microsoft.VisualStudio.Shell.Interop

Retornar ao topo