Compartir a través de


IVsLanguageDebugInfo.GetNameOfLocation Method

Definition

Generates a name for the given location in the file.

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

Parameters

pBuffer
IVsTextBuffer

[in] Returns the text buffer (IVsTextBuffer object) that contains the location.

iLine
Int32

[in] Number of the line containing the location.

iCol
Int32

[in] Column containing the location in the line.

pbstrName
String

[out] Returns a string containing the name of the location.

piLineOffset
Int32

[out] Returns an integer containing the line offset from iLine.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

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

This method generates a name for the given location in the given file. This name represents the "innermost named entity" in the source. If non-null, the piLineOffset parameter is filled with the offset from the first line of the named entity. Returns S_FALSE if the position doesn't fall within anything interesting.

Applies to