Udostępnij za pośrednictwem


IVsNavigableLocationResolver.GetPathFromLocation Method

Definition

Get the path of the specified location.

public:
 int GetPathFromLocation(System::UInt32 dwReserved, cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ ptsBase, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines ^ pBuffer, System::String ^ pszDisplayText, [Runtime::InteropServices::Out] System::UInt32 % dwOutFlags, [Runtime::InteropServices::Out] System::String ^ % pbstrPath);
int GetPathFromLocation(unsigned int dwReserved, std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & ptsBase, Microsoft::VisualStudio::TextManager::Interop::IVsTextLines const & pBuffer, std::wstring const & pszDisplayText, [Runtime::InteropServices::Out] unsigned int & dwOutFlags, [Runtime::InteropServices::Out] std::wstring const & & pbstrPath);
public int GetPathFromLocation (uint dwReserved, Microsoft.VisualStudio.TextManager.Interop.TextSpan[] ptsBase, Microsoft.VisualStudio.TextManager.Interop.IVsTextLines pBuffer, string pszDisplayText, out uint dwOutFlags, out string pbstrPath);
abstract member GetPathFromLocation : uint32 * Microsoft.VisualStudio.TextManager.Interop.TextSpan[] * Microsoft.VisualStudio.TextManager.Interop.IVsTextLines * string * uint32 * string -> int
Public Function GetPathFromLocation (dwReserved As UInteger, ptsBase As TextSpan(), pBuffer As IVsTextLines, pszDisplayText As String, ByRef dwOutFlags As UInteger, ByRef pbstrPath As String) As Integer

Parameters

dwReserved
UInt32

[in] Reserved. Set to zero.

ptsBase
TextSpan[]

[in] Current selection or caret location.

pBuffer
IVsTextLines

[in] Base buffer.

dwOutFlags
UInt32

[out] true if current location is a URL

pbstrPath
String

[out] As much of a path as possible or just the file name.

Returns

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

);

Applies to