Udostępnij za pośrednictwem


IVsLaunchPad.ExecBatchScript Method

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

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

Syntax

'Declaration
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, _
    <OutAttribute> pbstrOutput As String() _
) As Integer
int ExecBatchScript(
    string pszBatchFileContents,
    string pszWorkingDir,
    uint lpf,
    IVsOutputWindowPane pOutputWindowPane,
    uint nTaskItemCategory,
    uint nTaskItemBitmap,
    string pszTaskListSubcategory,
    IVsLaunchPadEvents pVsLaunchPadEvents,
    string[] pbstrOutput
)
int ExecBatchScript(
    [InAttribute] String^ pszBatchFileContents, 
    [InAttribute] String^ pszWorkingDir, 
    [InAttribute] unsigned int lpf, 
    [InAttribute] IVsOutputWindowPane^ pOutputWindowPane, 
    [InAttribute] unsigned int nTaskItemCategory, 
    [InAttribute] unsigned int nTaskItemBitmap, 
    [InAttribute] String^ pszTaskListSubcategory, 
    [InAttribute] IVsLaunchPadEvents^ pVsLaunchPadEvents, 
    [OutAttribute] array<String^>^ pbstrOutput
)
abstract ExecBatchScript : 
        pszBatchFileContents:string * 
        pszWorkingDir:string * 
        lpf:uint32 * 
        pOutputWindowPane:IVsOutputWindowPane * 
        nTaskItemCategory:uint32 * 
        nTaskItemBitmap:uint32 * 
        pszTaskListSubcategory:string * 
        pVsLaunchPadEvents:IVsLaunchPadEvents * 
        pbstrOutput:string[] byref -> int 
function ExecBatchScript(
    pszBatchFileContents : String, 
    pszWorkingDir : String, 
    lpf : uint, 
    pOutputWindowPane : IVsOutputWindowPane, 
    nTaskItemCategory : uint, 
    nTaskItemBitmap : uint, 
    pszTaskListSubcategory : String, 
    pVsLaunchPadEvents : IVsLaunchPadEvents, 
    pbstrOutput : String[]
) : int

Parameters

  • pszBatchFileContents
    Type: System.String
    [in] String containing the text to be written to the batch file.
  • pszWorkingDir
    Type: System.String
    [in] Working directory that is passed to CreateProcess by the environment. Can be nulla null reference (Nothing in Visual Basic).
  • pszTaskListSubcategory
    Type: System.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.
  • pbstrOutput
    Type: array<System.String[]
    [out] true if all output 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 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
);

.NET Framework Security

See Also

Reference

IVsLaunchPad Interface

Microsoft.VisualStudio.Shell.Interop Namespace