IVsFindTarget.GetCurrentSpan Method

Returns the coordinates or the caret position of the current selection.

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

Syntax

'Déclaration
Function GetCurrentSpan ( _
    <OutAttribute> pts As TextSpan() _
) As Integer
'Utilisation
Dim instance As IVsFindTarget
Dim pts As TextSpan()
Dim returnValue As Integer

returnValue = instance.GetCurrentSpan(pts)
int GetCurrentSpan(
    TextSpan[] pts
)
int GetCurrentSpan(
    [OutAttribute] array<TextSpan>^ pts
)
abstract GetCurrentSpan : 
        pts:TextSpan[] byref -> int 
function GetCurrentSpan(
    pts : TextSpan[]
) : int

Parameters

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

HRESULT IVsFindTarget::GetCurrentSpan(
   [out, retval] TextSpan * pts
);

Return the current caret position or the start and end positions of the highlighted selection. Place the position information in a TextSpan structure. For caret position, the start and end positions should be the same.

.NET Framework Security

See Also

Reference

IVsFindTarget Interface

IVsFindTarget Members

Microsoft.VisualStudio.TextManager.Interop Namespace