IVsLaunchPad.ParseOutputStringForTaskItem Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Parses an output string and sends the results to the output pane.
public:
int ParseOutputStringForTaskItem(System::String ^ pszOutputString, cli::array <System::UInt32> ^ pnPriority, cli::array <System::String ^> ^ pbstrFilename, cli::array <System::UInt32> ^ pnLineNum, cli::array <System::String ^> ^ pbstrTaskItemText, cli::array <int> ^ pfTaskItemFound);
public:
int ParseOutputStringForTaskItem(Platform::String ^ pszOutputString, Platform::Array <unsigned int> ^ pnPriority, Platform::Array <Platform::String ^> ^ pbstrFilename, Platform::Array <unsigned int> ^ pnLineNum, Platform::Array <Platform::String ^> ^ pbstrTaskItemText, Platform::Array <int> ^ pfTaskItemFound);
int ParseOutputStringForTaskItem(std::wstring const & pszOutputString, std::Array <unsigned int> const & pnPriority, std::Array <std::wstring const &> const & pbstrFilename, std::Array <unsigned int> const & pnLineNum, std::Array <std::wstring const &> const & pbstrTaskItemText, std::Array <int> const & pfTaskItemFound);
public int ParseOutputStringForTaskItem (string pszOutputString, uint[] pnPriority, string[] pbstrFilename, uint[] pnLineNum, string[] pbstrTaskItemText, int[] pfTaskItemFound);
abstract member ParseOutputStringForTaskItem : string * uint32[] * string[] * uint32[] * string[] * int[] -> int
Public Function ParseOutputStringForTaskItem (pszOutputString As String, pnPriority As UInteger(), pbstrFilename As String(), pnLineNum As UInteger(), pbstrTaskItemText As String(), pfTaskItemFound As Integer()) As Integer
Parameters
- pszOutputString
- String
[in] One line of output text.
- pnPriority
- 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
- String[]
[out] Filename inside PszOutputString
if found.
- pnLineNum
- UInt32[]
[out] Line number if the file is found.
- pbstrTaskItemText
- String[]
[out] Message following the file name and line number.
- pfTaskItemFound
- Int32[]
[out] true
if a file name, line number and message were found in PszOutputString
and the item was added to the list.
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::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 '}'