IVsNavigableLocationResolver::GetPathFromLocation Method (UInt32, array<TextSpan>^, IVsTextLines^, String^, UInt32, String^)
Visual Studio 2015
Get the path of the specified location.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
int GetPathFromLocation( unsigned int dwReserved, array<TextSpan>^ ptsBase, IVsTextLines^ pBuffer, String^ pszDisplayText, [OutAttribute] unsigned int% dwOutFlags, [OutAttribute] String^% pbstrPath )
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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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
);
Show: