创建浏览器的实例。CreateWebBrowser 方法的扩展。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)
语法
声明
Function CreateWebBrowserEx ( _
dwCreateFlags As UInteger, _
ByRef rguidPersistenceSlot As Guid, _
dwId As UInteger, _
lpszBaseCaption As String, _
lpszStartURL As String, _
pUser As IVsWebBrowserUser, _
<OutAttribute> ByRef ppBrowser As IVsWebBrowser, _
<OutAttribute> ByRef ppFrame As IVsWindowFrame _
) As Integer
int CreateWebBrowserEx(
uint dwCreateFlags,
ref Guid rguidPersistenceSlot,
uint dwId,
string lpszBaseCaption,
string lpszStartURL,
IVsWebBrowserUser pUser,
out IVsWebBrowser ppBrowser,
out IVsWindowFrame ppFrame
)
参数
- dwCreateFlags
类型:System.UInt32
[in] 指定浏览器选项的位标志。创建使用从 __VSCREATEWEBBROWSER 枚举的值。
- rguidPersistenceSlot
类型:System.Guid%
[in] 为浏览器窗口 GUID 的指针。必须注册窗口以保存和还原 Visual Studio 启动时。使用 GUID_NULL 使用默认值。
- dwId
类型:System.UInt32
[in] 窗口的整数标识符。为下一个可用使用 0。
- lpszBaseCaption
类型:System.String
[in] 对包含窗口标题的字符串的指针。为默认阐释 nullnull 引用(在 Visual Basic 中为 Nothing) 。
- lpszStartURL
类型:System.String
[in] 对包含页的 URL 的字符串的指针显示。为默认值, Visual Studio 主页使用 nullnull 引用(在 Visual Basic 中为 Nothing) 。
- pUser
类型:Microsoft.VisualStudio.Shell.Interop.IVsWebBrowserUser
[in] 对于使用的 IVsWebBrowserUser 接口的指针在控件浏览器。,如果您为 rguidPersistenceSlot,指定 GUID_NULL 应为 nullnull 引用(在 Visual Basic 中为 Nothing) 。
- ppBrowser
类型:Microsoft.VisualStudio.Shell.Interop.IVsWebBrowser%
[out] 给浏览器的 IVsWebBrowser 接口的指针。可以为 nullnull 引用(在 Visual Basic 中为 Nothing)。
- ppFrame
类型:Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame%
[out] 对包含浏览器的窗架 (IVsWindowFrame) 的指针。可以为 nullnull 引用(在 Visual Basic 中为 Nothing)。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsbrowse.idl:
HRESULT IVsWebBrowsingService::CreateWebBrowserEx(
[in] VSCREATEWEBBROWSER dwCreateFlags,
[in] REFGUID rguidPersistenceSlot,
[in] DWORD dwId,
[in] LPCOLESTR lpszBaseCaption,
[in] LPCOLESTR lpszStartURL,
[in] IVsWebBrowserUser* pUser,
[out] IVsWebBrowser** ppBrowser,
[out] IVsWindowFrame** ppFrame
);
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。