共用方式為


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 命名空間