共用方式為


IVsOutputWindowPane2.OutputTaskItemStringEx2 Method

Adds a string to the Output window and a corresponding item to the error list.

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

Syntax

'宣告
Function OutputTaskItemStringEx2 ( _
    pszOutputString As String, _
    nPriority As VSTASKPRIORITY, _
    nCategory As VSTASKCATEGORY, _
    pszSubcategory As String, _
    nBitmap As Integer, _
    pszFileName As String, _
    nLineNum As UInteger, _
    nColumn As UInteger, _
    pszProjectUniqueName As String, _
    pszTaskItemText As String, _
    pszLookupKwd As String _
) As Integer
'用途
Dim instance As IVsOutputWindowPane2
Dim pszOutputString As String
Dim nPriority As VSTASKPRIORITY
Dim nCategory As VSTASKCATEGORY
Dim pszSubcategory As String
Dim nBitmap As Integer
Dim pszFileName As String
Dim nLineNum As UInteger
Dim nColumn As UInteger
Dim pszProjectUniqueName As String
Dim pszTaskItemText As String
Dim pszLookupKwd As String
Dim returnValue As Integer

returnValue = instance.OutputTaskItemStringEx2(pszOutputString, _
    nPriority, nCategory, pszSubcategory, _
    nBitmap, pszFileName, nLineNum, nColumn, _
    pszProjectUniqueName, pszTaskItemText, _
    pszLookupKwd)
int OutputTaskItemStringEx2(
    string pszOutputString,
    VSTASKPRIORITY nPriority,
    VSTASKCATEGORY nCategory,
    string pszSubcategory,
    int nBitmap,
    string pszFileName,
    uint nLineNum,
    uint nColumn,
    string pszProjectUniqueName,
    string pszTaskItemText,
    string pszLookupKwd
)
int OutputTaskItemStringEx2(
    [InAttribute] String^ pszOutputString, 
    [InAttribute] VSTASKPRIORITY nPriority, 
    [InAttribute] VSTASKCATEGORY nCategory, 
    [InAttribute] String^ pszSubcategory, 
    [InAttribute] int nBitmap, 
    [InAttribute] String^ pszFileName, 
    [InAttribute] unsigned int nLineNum, 
    [InAttribute] unsigned int nColumn, 
    [InAttribute] String^ pszProjectUniqueName, 
    [InAttribute] String^ pszTaskItemText, 
    [InAttribute] String^ pszLookupKwd
)
abstract OutputTaskItemStringEx2 : 
        pszOutputString:string * 
        nPriority:VSTASKPRIORITY * 
        nCategory:VSTASKCATEGORY * 
        pszSubcategory:string * 
        nBitmap:int * 
        pszFileName:string * 
        nLineNum:uint32 * 
        nColumn:uint32 * 
        pszProjectUniqueName:string * 
        pszTaskItemText:string * 
        pszLookupKwd:string -> int 
function OutputTaskItemStringEx2(
    pszOutputString : String, 
    nPriority : VSTASKPRIORITY, 
    nCategory : VSTASKCATEGORY, 
    pszSubcategory : String, 
    nBitmap : int, 
    pszFileName : String, 
    nLineNum : uint, 
    nColumn : uint, 
    pszProjectUniqueName : String, 
    pszTaskItemText : String, 
    pszLookupKwd : String
) : int

Parameters

  • pszOutputString
    Type: System.String
    [in] Output string of the task item.
  • pszSubcategory
    Type: System.String
    [in] Subcategory of the task.
  • pszFileName
    Type: System.String
    [in] Name of the file containing pszOutputString.
  • nColumn
    Type: System.UInt32
    [in] Zero-based column in pszFilename.
  • pszProjectUniqueName
    Type: System.String
    [in] The unique name of the project for the Error List entry. May be nulla null reference (Nothing in Visual Basic) if no project is associated with the error.
  • pszTaskItemText
    Type: System.String
    [in] Text of the task item.

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 vsshell90.idl:

HRESULT IVsOutputWindowPane::OutputTaskItemStringEx2(
   [in] LPCOLESTR pszOutputString,
   [in] VSTASKPRIORITY nPriority,
   [in] VSTASKCATEGORY nCategory,
   [in] LPCOLESTR pszSubcategory,
   [in] VSTASKBITMAP nBitmap,
   [in] LPCOLESTR pszFilename,
   [in] ULONG nLineNum,
   [in] ULONG nColumn,
   [in] LPCOLESTR pszProjectUniqueName,
   [in] LPCOLESTR pszTaskItemText,
   [in] LPCOLESTR pszLookupKwd
);

.NET Framework Security

See Also

Reference

IVsOutputWindowPane2 Interface

IVsOutputWindowPane2 Members

Microsoft.VisualStudio.Shell.Interop Namespace