返回源文件,并为的行号列表项。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)
语法
声明
Function GetSourceContextWithOwnership ( _
index As UInteger, _
<OutAttribute> ByRef pbstrFilename As String, _
<OutAttribute> ByRef pulLineNum As UInteger _
) As Integer
int GetSourceContextWithOwnership(
uint index,
out string pbstrFilename,
out uint pulLineNum
)
参数
- index
类型:System.UInt32
[in] 指定列表项的索引相关。
- pbstrFilename
类型:System.String%
[out] 返回包含文件名的字符串。
- pulLineNum
类型:System.UInt32%
[out] 返回行号与列表项。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsshell80.idl:
HRESULT IVsSimpleObjectList2::GetSourceContextWithOwnership(
[in] ULONG Index,
[out] BSTR *pszFileName,
[out] ULONG *pulLineNum
);
此方法用于显示在 " 查找符号结果 " 窗口的源文件和行号。,如果您不希望显示此信息,可以返回 E_NOTIMPL 。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。