IVsNavigableLocationResolver.GetPathFromLocation 方法

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

语法

声明
Function GetPathFromLocation ( _
    dwReserved As UInteger, _
    ptsBase As TextSpan(), _
    pBuffer As IVsTextLines, _
    pszDisplayText As String, _
    <OutAttribute> ByRef dwOutFlags As UInteger, _
    <OutAttribute> ByRef pbstrPath As String _
) As Integer
int GetPathFromLocation(
    uint dwReserved,
    TextSpan[] ptsBase,
    IVsTextLines pBuffer,
    string pszDisplayText,
    out uint dwOutFlags,
    out string pbstrPath
)
int GetPathFromLocation(
    [InAttribute] unsigned int dwReserved, 
    [InAttribute] array<TextSpan>^ ptsBase, 
    [InAttribute] IVsTextLines^ pBuffer, 
    [InAttribute] String^ pszDisplayText, 
    [OutAttribute] unsigned int% dwOutFlags, 
    [OutAttribute] String^% pbstrPath
)
abstract GetPathFromLocation : 
        dwReserved:uint32 * 
        ptsBase:TextSpan[] * 
        pBuffer:IVsTextLines * 
        pszDisplayText:string * 
        dwOutFlags:uint32 byref * 
        pbstrPath:string byref -> int
function GetPathFromLocation(
    dwReserved : uint, 
    ptsBase : TextSpan[], 
    pBuffer : IVsTextLines, 
    pszDisplayText : String, 
    dwOutFlags : uint, 
    pbstrPath : String
) : int

参数

  • dwReserved
    类型:UInt32

    [in] 已保留。 设置为零。

  • pszDisplayText
    类型:String

    [in] 从 GetDisplayText的显示文本

  • dwOutFlags
    类型:UInt32%

    [out] true ,如果当前位置是 URL。

  • pbstrPath
    类型:String%

    [out] 具有相同的路径尽可能或文件名。

返回值

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

备注

COM 签名

从 textmgr.idl:

HRESULT IVsNavigableLocationResolver::GetPathFromLocation(

   [in] DWORD dwReserved,

   [in] TextSpan *ptsBase,

   [in] IVsTextLines *pBuffer,

   [in] const WCHAR *pszDisplayText,

   [out] NavigableLocationResolverFlags *dwOutFlags,

   [out,retval] BSTR * pbstrPath

);

.NET Framework 安全性

请参阅

参考

IVsNavigableLocationResolver 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间