Share via


IVsLanguageDebugInfo.GetNameOfLocation Method

Generates a name for the given location in the file.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
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

Parameters

  • iLine
    Type: System.Int32
    [in] Number of the line containing the location.
  • iCol
    Type: System.Int32
    [in] Column containing the location in the line.
  • pbstrName
    Type: System.String%
    [out] Returns a string containing the name of the location.
  • piLineOffset
    Type: System.Int32%
    [out] Returns an integer containing the line offset from iLine.

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsLanguageDebugInfo Interface

Microsoft.VisualStudio.TextManager.Interop Namespace