Compartilhar via


IVsLaunchPad.ExecBatchScript Method

Definition

Creates a temporary batch file to be executed with output piped to an output pane in the IDE.

public:
 int ExecBatchScript(System::String ^ pszBatchFileContents, System::String ^ pszWorkingDir, System::UInt32 lpf, Microsoft::VisualStudio::Shell::Interop::IVsOutputWindowPane ^ pOutputWindowPane, System::UInt32 nTaskItemCategory, System::UInt32 nTaskItemBitmap, System::String ^ pszTaskListSubcategory, Microsoft::VisualStudio::Shell::Interop::IVsLaunchPadEvents ^ pVsLaunchPadEvents, cli::array <System::String ^> ^ pbstrOutput);
public:
 int ExecBatchScript(Platform::String ^ pszBatchFileContents, Platform::String ^ pszWorkingDir, unsigned int lpf, Microsoft::VisualStudio::Shell::Interop::IVsOutputWindowPane ^ pOutputWindowPane, unsigned int nTaskItemCategory, unsigned int nTaskItemBitmap, Platform::String ^ pszTaskListSubcategory, Microsoft::VisualStudio::Shell::Interop::IVsLaunchPadEvents ^ pVsLaunchPadEvents, Platform::Array <Platform::String ^> ^ pbstrOutput);
int ExecBatchScript(std::wstring const & pszBatchFileContents, 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, std::Array <std::wstring const &> const & pbstrOutput);
public int ExecBatchScript (string pszBatchFileContents, string pszWorkingDir, uint lpf, Microsoft.VisualStudio.Shell.Interop.IVsOutputWindowPane pOutputWindowPane, uint nTaskItemCategory, uint nTaskItemBitmap, string pszTaskListSubcategory, Microsoft.VisualStudio.Shell.Interop.IVsLaunchPadEvents pVsLaunchPadEvents, string[] pbstrOutput);
abstract member ExecBatchScript : string * string * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsOutputWindowPane * uint32 * uint32 * string * Microsoft.VisualStudio.Shell.Interop.IVsLaunchPadEvents * string[] -> int
Public Function ExecBatchScript (pszBatchFileContents As String, pszWorkingDir As String, lpf As UInteger, pOutputWindowPane As IVsOutputWindowPane, nTaskItemCategory As UInteger, nTaskItemBitmap As UInteger, pszTaskListSubcategory As String, pVsLaunchPadEvents As IVsLaunchPadEvents, pbstrOutput As String()) As Integer

Parameters

pszBatchFileContents
String

[in] String containing the text to be written to the batch file.

pszWorkingDir
String

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

lpf
UInt32

[in] Launch pad flags. Values are taken from the _LAUNCHPAD_FLAGS 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 is specified. Values are taken from the _vstaskbitmap enumeration.

pszTaskListSubcategory
String

[in] Specifies a new task list subcategory to be created if lpf is set to LPF_PipeStdoutToTaskList is specified. The new subcategory is used for sorting and grouping in the task pane.

pVsLaunchPadEvents
IVsLaunchPadEvents

[in] Pointer to the IVsLaunchPadEvents interface.

pbstrOutput
String[]

[out] true if all output 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 vsshell.idl:

HRESULT IVsLaunchPad::ExecBatchScript(  
   [in] LPCOLESTR pszBatchFileContents,  
   [in] LPCOLESTR pszWorkingDir,  
   [in] LAUNCHPAD_FLAGS lpf,  
   [in] IVsOutputWindowPane *pOutputWindowPane,  
   [in] ULONG nTaskItemCategory,  
   [in] ULONG nTaskItemBitmap,  
   [in] LPCOLESTR pszTaskListSubcategory,  
   [in] IVsLaunchPadEvents *pVsLaunchPadEvents,  
   [out] BSTR *pbstrOutput  
);  

Applies to