IVsLaunchPad::ParseOutputStringForTaskItem Method (String^, array<UInt32>^, array<String^>^, array<UInt32>^, array<String^>^, array<Int32>^)
Parses an output string and sends the results to the output pane.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int ParseOutputStringForTaskItem( String^ pszOutputString, array<unsigned int>^ pnPriority, array<String^>^ pbstrFilename, array<unsigned int>^ pnLineNum, array<String^>^ pbstrTaskItemText, array<int>^ pfTaskItemFound )
Parameters
- pszOutputString
-
Type:
System::String^
[in] One line of output text.
- pnPriority
-
Type:
array<System::UInt32>^
[out] Values are taken from the _vstaskpriority enumeration. Value returned is TP_HIGH when the text is "error", and TP_NORMAL for all other 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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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 null.
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 '}'