命名空间: 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] 已保留。 设置为零。
ptsBase
类型:array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[][in] 当前选定内容或脱字号位置。
pBuffer
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextLines[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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。