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