IVsLanguageDebugInfo.GetNameOfLocation 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为文件中的给定位置生成名称。
public:
int GetNameOfLocation(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, int iLine, int iCol, [Runtime::InteropServices::Out] System::String ^ % pbstrName, [Runtime::InteropServices::Out] int % piLineOffset);
int GetNameOfLocation(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer, int iLine, int iCol, [Runtime::InteropServices::Out] std::wstring const & & pbstrName, [Runtime::InteropServices::Out] int & piLineOffset);
public int GetNameOfLocation (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, int iLine, int iCol, out string pbstrName, out int piLineOffset);
abstract member GetNameOfLocation : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * int * int * string * int -> int
Public Function GetNameOfLocation (pBuffer As IVsTextBuffer, iLine As Integer, iCol As Integer, ByRef pbstrName As String, ByRef piLineOffset As Integer) As Integer
参数
- pBuffer
- IVsTextBuffer
中返回 (IVsTextBuffer 包含位置) 对象的文本缓冲区。
- iLine
- Int32
中包含该位置的行号。
- iCol
- Int32
中包含行中的位置的列。
- pbstrName
- String
弄返回一个字符串,该字符串包含位置的名称。
- piLineOffset
- Int32
弄返回一个整数,该整数包含中的行偏移量 iLine 。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 textmgr:
HRESULT IVsLanguageDebugInfo::GetNameOfLocation(
[in] IVsTextBuffer *pBuffer,
[in] long iLine,
[in] long iCol,
[out] BSTR *pbstrName,
[out] long *piLineOffset
);
此方法为给定文件中的给定位置生成名称。 此名称表示源中的 "最内部命名实体"。 如果非 null,则 piLineOffset 用从命名实体的第一行开始的偏移量填充参数。 S_FALSE如果位置不在任何感兴趣的位置,则返回。