共用方式為


IVsTextStreamMarker.GetCurrentSpan 方法

會傳回目前的位置資訊,該標記的文字資料流中。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
Function GetCurrentSpan ( _
    <OutAttribute> ByRef piPos As Integer, _
    <OutAttribute> ByRef piLen As Integer _
) As Integer
int GetCurrentSpan(
    out int piPos,
    out int piLen
)
int GetCurrentSpan(
    [OutAttribute] int% piPos, 
    [OutAttribute] int% piLen
)
abstract GetCurrentSpan : 
        piPos:int byref * 
        piLen:int byref -> int
function GetCurrentSpan(
    piPos : int, 
    piLen : int
) : int

參數

  • piPos
    類型:Int32%

    [] out文字標記的位置。

  • piLen
    類型:Int32%

    [] out文字標記的長度。

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

HRESULT IVsTextStreamMarker::GetCurrentSpan(
   [out] long *piPos,
   [out] long *piLen
);

使用這個方法來判斷目前的範圍和文字標記的位置。

.NET Framework 安全性

請參閱

參考

IVsTextStreamMarker 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間