IVsTextBufferCoordinator.GetMappingOfPrimaryPosition 方法

映射在主缓冲区中的指定位置到辅助缓冲区的大小。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)

语法

声明
Function GetMappingOfPrimaryPosition ( _
    lPosition As Integer, _
    <OutAttribute> ptsPrimary As TextSpan(), _
    <OutAttribute> ptsSecondary As TextSpan() _
) As Integer
int GetMappingOfPrimaryPosition(
    int lPosition,
    TextSpan[] ptsPrimary,
    TextSpan[] ptsSecondary
)
int GetMappingOfPrimaryPosition(
    [InAttribute] int lPosition, 
    [OutAttribute] array<TextSpan>^ ptsPrimary, 
    [OutAttribute] array<TextSpan>^ ptsSecondary
)
abstract GetMappingOfPrimaryPosition : 
        lPosition:int * 
        ptsPrimary:TextSpan[] byref * 
        ptsSecondary:TextSpan[] byref -> int
function GetMappingOfPrimaryPosition(
    lPosition : int, 
    ptsPrimary : TextSpan[], 
    ptsSecondary : TextSpan[]
) : int

参数

  • lPosition
    类型:Int32

    [in] 一个字符偏移量从最初缓冲区的主要缓冲区。

返回值

类型:Int32
如果成功,则返回; S_OK否则,返回错误代码。

备注

COM 签名

从 singlefileeditor.idl:

HRESULT GetMappingOfPrimaryPosition(
   [in]  long      lPosition,
   [out] TextSpan *ptsPrimary,
   [out] TextSpan *ptsSecondary
);

.NET Framework 安全性

请参阅

参考

IVsTextBufferCoordinator 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间