在 IDE 中显示一个源文件。采用作为参数传递指向可用于 IDebugDocumentContext2 和显示选项要查询的 IUnknown 接口。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)
语法
声明
Function ShowSource ( _
pUnkDebugDocContext As Object, _
fMakeActive As Integer, _
fAlwaysMoveCaret As Integer, _
fPromptToFindSource As Integer, _
fIgnoreIfNotFound As Integer, _
<OutAttribute> ByRef ppTextView As IVsTextView _
) As Integer
int ShowSource(
Object pUnkDebugDocContext,
int fMakeActive,
int fAlwaysMoveCaret,
int fPromptToFindSource,
int fIgnoreIfNotFound,
out IVsTextView ppTextView
)
参数
- pUnkDebugDocContext
类型:System.Object
[in] 对一 IUnknown 接口的指针在实现 IDebugDocumentContext2 的对象。
- fMakeActive
类型:System.Int32
[in] 布尔值。如果 true,使源文件窗口活动窗口。
- fAlwaysMoveCaret
类型:System.Int32
[in] 布尔值。如果 true,将脱字号移至文档上下文表示的该位置。 IDebugDocumentContext2:: IDebugDocumentContext2 接口的 GetStatementRange 方法。
- fPromptToFindSource
类型:System.Int32
[in] 布尔值。如果 true,提示用户,如果未找到该文件。
- fIgnoreIfNotFound
类型:System.Int32
[in] 布尔值。如果 true,不会在将来查找文件,如果现在未找到。
- ppTextView
类型:Microsoft.VisualStudio.TextManager.Interop.IVsTextView%
[out] 为表示已打开 " 源 " 视图的 IVsTextView 接口的指针。可以为 nullnull 引用(在 Visual Basic 中为 Nothing)。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsshell80.idl:
HRESULT IVsDebugger2::ShowSource(
[in] IUnknown *pUnkDebugDocContext,
[in] BOOL fMakeActive,
[in] BOOL fAlwaysMoveCaret,
[in] BOOL fPromptToFindSource,
[in] BOOL fIgnoreIfNotFound,
[out] IVsTextView **ppTextView
);
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。