共用方式為


IVsTaskList2.GetCaretPos Method

Returns the item that currently has the caret. This item is always among the selected items.

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

Syntax

'宣告
Function GetCaretPos ( _
    <OutAttribute> ByRef ppItem As IVsTaskItem _
) As Integer
'用途
Dim instance As IVsTaskList2
Dim ppItem As IVsTaskItem
Dim returnValue As Integer

returnValue = instance.GetCaretPos(ppItem)
int GetCaretPos(
    out IVsTaskItem ppItem
)
int GetCaretPos(
    [OutAttribute] IVsTaskItem^% ppItem
)
abstract GetCaretPos : 
        ppItem:IVsTaskItem byref -> int 
function GetCaretPos(
    ppItem : IVsTaskItem
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

If no item has the caret, this method will return NULL.

COM Signature

From vsshell80.idl:

HRESULT GetCaretPos(
   [out] IVsTaskItem** ppItem
);

.NET Framework Security

See Also

Reference

IVsTaskList2 Interface

IVsTaskList2 Members

Microsoft.VisualStudio.Shell.Interop Namespace