Nota
O acesso a esta página requer autorização. Pode tentar iniciar sessão ou alterar os diretórios.
O acesso a esta página requer autorização. Pode tentar alterar os diretórios.
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.
- pOutputWindowPane
[in] Ponteiro para o IVsOutputWindowPane interface criada por CreatePane.
- nTaskItemCategory
[in] Categoria do item, de tarefas se lpf for definido como LPF_PipeStdoutToTaskList.Valores são obtidas a partir do VSTASKCATEGORY enumeração.
- nTaskItemBitmap
[in] Bitmap do item, de tarefas se lpf for definido como LPF_PipeStdoutToTaskList.
- pszTaskListSubcategory
[in] Subcategoria da lista, de tarefas se lpf for definido como LPF_PipeStdoutToTaskList.
- pVsLaunchPadEvents
[in] Ponteiro para o IVsLaunchPadEvents interface.
- 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