Bagikan melalui


IVsLaunchPad.ParseOutputStringForTaskItem Method

Parses an output string and sends the results to the output pane.

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

Syntax

'Declaration
Function ParseOutputStringForTaskItem ( _
    pszOutputString As String, _
    <OutAttribute> pnPriority As UInteger(), _
    <OutAttribute> pbstrFilename As String(), _
    <OutAttribute> pnLineNum As UInteger(), _
    <OutAttribute> pbstrTaskItemText As String(), _
    <OutAttribute> pfTaskItemFound As Integer() _
) As Integer
int ParseOutputStringForTaskItem(
    string pszOutputString,
    uint[] pnPriority,
    string[] pbstrFilename,
    uint[] pnLineNum,
    string[] pbstrTaskItemText,
    int[] pfTaskItemFound
)
int ParseOutputStringForTaskItem(
    [InAttribute] String^ pszOutputString, 
    [OutAttribute] array<unsigned int>^ pnPriority, 
    [OutAttribute] array<String^>^ pbstrFilename, 
    [OutAttribute] array<unsigned int>^ pnLineNum, 
    [OutAttribute] array<String^>^ pbstrTaskItemText, 
    [OutAttribute] array<int>^ pfTaskItemFound
)
abstract ParseOutputStringForTaskItem : 
        pszOutputString:string * 
        pnPriority:uint32[] byref * 
        pbstrFilename:string[] byref * 
        pnLineNum:uint32[] byref * 
        pbstrTaskItemText:string[] byref * 
        pfTaskItemFound:int[] byref -> int 
function ParseOutputStringForTaskItem(
    pszOutputString : String, 
    pnPriority : uint[], 
    pbstrFilename : String[], 
    pnLineNum : uint[], 
    pbstrTaskItemText : String[], 
    pfTaskItemFound : int[]
) : int

Parameters

  • pszOutputString
    Type: System.String
    [in] One line of output text.
  • pbstrFilename
    Type: array<System.String[]
    [out] Filename inside PszOutputString if found.
  • pnLineNum
    Type: array<System.UInt32[]
    [out] Line number if the file is found.
  • pbstrTaskItemText
    Type: array<System.String[]
    [out] Message following the file name and line number.
  • pfTaskItemFound
    Type: array<System.Int32[]
    [out] true if a file name, line number and message were found in PszOutputString and the item was added to the list.

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::ParseOutputStringForTaskItem(
   [in] LPCOLESTR pszOutputString,
   [out] ULONG *pnPriority,
   [out] BSTR *pbstrFilename,
   [out] ULONG *pnLineNum,
   [out] BSTR *pbstrTaskItemText,
   [out] BOOL *pfTaskItemFound
);

The environment parses and sends the parsed elements to the output pane. It also returns the parsed elements in the [out] parameters of the method. Any of the [out] parameters may be nulla null reference (Nothing in Visual Basic).

The output string must be in a specific format:

block1 : block2 : block3 or

block1 : block3

Block1 contains <filename>(line number). Block2 contains either "error" or "warning". Block3 contains message text.

In addition, the line number in block1 can also include the column number, <filename>(n,m). In all cases the line number is required.

The environment first parses PszOutputString for the semicolons to determine if it contains two or three blocks, then parses the information in the blocks.

An example of an output string would be:

c:\My Documents\Visual Studio Projects\...\Class1.h(57) : error C2143: syntax error : missing ';' before '}'

.NET Framework Security

See Also

Reference

IVsLaunchPad Interface

Microsoft.VisualStudio.Shell.Interop Namespace