Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Get the path of the specified location.
Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Declaration
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
Parameters
- dwReserved 
 Type: System.UInt32- [in] Reserved. Set to zero. 
- ptsBase 
 Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]- [in] Current selection or caret location. 
- pBuffer 
 Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines- [in] Base buffer. 
- pszDisplayText 
 Type: System.String- [in] Display Text from GetDisplayText 
- dwOutFlags 
 Type: System.UInt32%- [out] true if current location is a URL 
- pbstrPath 
 Type: System.String%- [out] As much of a path as possible or just the file name. 
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 IVsNavigableLocationResolver::GetPathFromLocation(
[in] DWORD dwReserved,
[in] TextSpan *ptsBase,
[in] IVsTextLines *pBuffer,
[in] const WCHAR *pszDisplayText,
[out] NavigableLocationResolverFlags *dwOutFlags,
[out,retval] BSTR * pbstrPath
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.