次の方法で共有


IVsTaskItem2.Document Method

Returns the name of the file associated with a task item.

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

Syntax

'宣言
Function Document ( _
    <OutAttribute> ByRef pbstrMkDocument As String _
) As Integer
'使用
Dim instance As IVsTaskItem2
Dim pbstrMkDocument As String
Dim returnValue As Integer

returnValue = instance.Document(pbstrMkDocument)
int Document(
    out string pbstrMkDocument
)
int Document(
    [OutAttribute] String^% pbstrMkDocument
)
function Document(
    pbstrMkDocument : String
) : int

Parameters

  • pbstrMkDocument
    Type: System.String%

    [out, retval] Path to the document for this task item.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Implements

IVsTaskItem.Document(String%)

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsTaskItem::Document(
   [out,retval] BSTR *pbstrMkDocument
);

Use this method to specify a file that is the source of a task item. To further specify the exact line and column that correspond to this task within the file, implement the Line and Column methods, respectively. Implement the NavigateTo method to open the file specified by the Document method and move the cursor to the position specified by the Line and Column methods.

Permissions

See Also

Reference

IVsTaskItem2 Interface

IVsTaskItem2 Members

Microsoft.VisualStudio.Shell.Interop Namespace