IVsWebBrowsingService.CreateWebBrowserEx 方法

创建浏览器的实例。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
)

参数

  • 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) 。

返回值

类型: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 安全性

请参见

参考

IVsWebBrowsingService 接口

Microsoft.VisualStudio.Shell.Interop 命名空间