Udostępnij za pośrednictwem


Metoda IVsLaunchPad.ExecCommand — (String, String, String, UInt32, IVsOutputWindowPane, UInt32, UInt32, String, IVsLaunchPadEvents, UInt32, String )

 

Wykonuje polecenie z wyjściowe przekazywane w potoku do panelu Wyjście w IDE.

Przestrzeń nazw:   Microsoft.VisualStudio.Shell.Interop
Zestaw:  Microsoft.VisualStudio.Shell.Interop (w Microsoft.VisualStudio.Shell.Interop.dll)

Składnia

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

Parametry

  • pszApplicationName
    [w] Nazwa aplikacji, który jest przekazywany do CreateProcess przez środowisko naturalne.Aby uzyskać więcej informacji, zobacz CreateProcess.
  • pszCommandLine
    [w] Ciąg wiersza polecenia przekazanego do CreateProcess przez środowisko naturalne.
  • pszWorkingDir
    [w] Katalog roboczy, który jest przekazywany do CreateProcess przez środowisko naturalne.Can be null.
  • pdwProcessExitCode
    [out] Wartość zwracana przez proces.
  • pbstrOutput
    [out] true , jeśli wszystkie dane wyjściowe został wygenerowany.Can be null.

Wartość zwracana

Type: System.Int32

Jeśli metoda się powiedzie, zwraca S_OK.Jeśli nie powiedzie się, zwraca kod błędu.

Uwagi

Podpis COM

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

Jeśli ExecBatchScript jest wywoływana z lpf ustaw wartośćLPF_PipeStdoutToOutputWindow | LPF_PipeStdoutToTaskList, ExecBatchScript internally calls ParseOutputStringForTaskItem.Oznacza to żadnego wyjścia wygenerowane przez pszApplicationName muszą spełniać wymagania formatu ParseOutputStringForTaskItem.

Zobacz też

Interfejs IVsLaunchPad
Przestrzeń nazw Microsoft.VisualStudio.Shell.Interop

Powrót do początku