IVsLanguageDebugInfo.GetNameOfLocation 方法

生成该文件的名称的特定位置。

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

语法

声明
Function GetNameOfLocation ( _
    pBuffer As IVsTextBuffer, _
    iLine As Integer, _
    iCol As Integer, _
    <OutAttribute> ByRef pbstrName As String, _
    <OutAttribute> ByRef piLineOffset As Integer _
) As Integer
int GetNameOfLocation(
    IVsTextBuffer pBuffer,
    int iLine,
    int iCol,
    out string pbstrName,
    out int piLineOffset
)
int GetNameOfLocation(
    [InAttribute] IVsTextBuffer^ pBuffer, 
    [InAttribute] int iLine, 
    [InAttribute] int iCol, 
    [OutAttribute] String^% pbstrName, 
    [OutAttribute] int% piLineOffset
)
abstract GetNameOfLocation : 
        pBuffer:IVsTextBuffer * 
        iLine:int * 
        iCol:int * 
        pbstrName:string byref * 
        piLineOffset:int byref -> int
function GetNameOfLocation(
    pBuffer : IVsTextBuffer, 
    iLine : int, 
    iCol : int, 
    pbstrName : String, 
    piLineOffset : int
) : int

参数

  • iLine
    类型:Int32

    [in] 包含位置的行的编号。

  • iCol
    类型:Int32

    [in] 包含位置的列位于行。

  • pbstrName
    类型:String%

    [out] 返回包含位置的名称的字符串。

  • piLineOffset
    类型:Int32%

    [out] 返回包含从 iLine的整数行偏移量。

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 textmgr.idl:

HRESULT IVsLanguageDebugInfo::GetNameOfLocation(
   [in] IVsTextBuffer *pBuffer, 
   [in] long iLine, 
   [in] long iCol, 
   [out] BSTR *pbstrName, 
   [out] long *piLineOffset
);

此方法生成一个名称。特定文件的特定位置。 此名称表示 “最内层的命名实体”在源。 如果非 null, piLineOffset 参数填充偏移量命名实体的第一行。 ,如果此位置不属于有趣,的任何返回 S_FALSE

.NET Framework 安全性

请参阅

参考

IVsLanguageDebugInfo 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间