/*********************************************************************** * DllRegisterServer (MSHTML.@) */ HRESULT WINAPI DllRegisterServer(void) { HRESULT hres; hres = register_server(TRUE); if(SUCCEEDED(hres)) load_gecko(FALSE); return hres; }
/*********************************************************************** * DllRegisterServer (MSHTML.@) */ HRESULT WINAPI DllRegisterServer(void) { HRESULT hres; hres = __wine_register_resources( hInst, NULL ); if(SUCCEEDED(hres)) hres = register_server(TRUE); if(SUCCEEDED(hres)) load_gecko(FALSE); return hres; }
NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent) { nsIWebBrowserSetup *wbsetup; NSContainer *ret; nsresult nsres; if(!load_gecko()) return NULL; ret = mshtml_alloc(sizeof(NSContainer)); ret->lpWebBrowserChromeVtbl = &nsWebBrowserChromeVtbl; ret->lpContextMenuListenerVtbl = &nsContextMenuListenerVtbl; ret->lpURIContentListenerVtbl = &nsURIContentListenerVtbl; ret->lpEmbeddingSiteWindowVtbl = &nsEmbeddingSiteWindowVtbl; ret->lpTooltipListenerVtbl = &nsTooltipListenerVtbl; ret->lpInterfaceRequestorVtbl = &nsInterfaceRequestorVtbl; ret->lpWeakReferenceVtbl = &nsWeakReferenceVtbl; ret->lpSupportsWeakReferenceVtbl = &nsSupportsWeakReferenceVtbl; ret->doc = doc; ret->ref = 1; ret->bscallback = NULL; if(parent) nsIWebBrowserChrome_AddRef(NSWBCHROME(parent)); ret->parent = parent; nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr, NS_WEBBROWSER_CONTRACTID, NULL, &IID_nsIWebBrowser, (void**)&ret->webbrowser); if(NS_FAILED(nsres)) ERR("Creating WebBrowser failed: %08lx\n", nsres); nsres = nsIWebBrowser_SetContainerWindow(ret->webbrowser, NSWBCHROME(ret)); if(NS_FAILED(nsres)) ERR("SetContainerWindow failed: %08lx\n", nsres); nsres = nsIWebBrowser_QueryInterface(ret->webbrowser, &IID_nsIBaseWindow, (void**)&ret->window); if(NS_FAILED(nsres)) ERR("Could not get nsIBaseWindow interface: %08lx\n", nsres); nsres = nsIWebBrowser_QueryInterface(ret->webbrowser, &IID_nsIWebBrowserSetup, (void**)&wbsetup); if(NS_SUCCEEDED(nsres)) { nsres = nsIWebBrowserSetup_SetProperty(wbsetup, SETUP_IS_CHROME_WRAPPER, TRUE); nsIWebBrowserSetup_Release(wbsetup); if(NS_FAILED(nsres)) ERR("SetProperty(SETUP_IS_CHROME_WRAPPER) failed: %08lx\n", nsres); }else { ERR("Could not get nsIWebBrowserSetup interface\n"); } nsres = nsIWebBrowser_QueryInterface(ret->webbrowser, &IID_nsIWebNavigation, (void**)&ret->navigation); if(NS_FAILED(nsres)) ERR("Could not get nsIWebNavigation interface: %08lx\n", nsres); nsres = nsIWebBrowserFocus_QueryInterface(ret->webbrowser, &IID_nsIWebBrowserFocus, (void**)&ret->focus); if(NS_FAILED(nsres)) ERR("Could not get nsIWebBrowserFocus interface: %08lx\n", nsres); if(!nscontainer_class) register_nscontainer_class(); ret->hwnd = CreateWindowExW(0, wszNsContainer, NULL, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 100, 100, GetDesktopWindow(), NULL, hInst, ret); nsres = nsIBaseWindow_InitWindow(ret->window, ret->hwnd, NULL, 0, 0, 100, 100); if(NS_SUCCEEDED(nsres)) { nsres = nsIBaseWindow_Create(ret->window); if(NS_FAILED(nsres)) WARN("Creating window failed: %08lx\n", nsres); nsIBaseWindow_SetVisibility(ret->window, FALSE); nsIBaseWindow_SetEnabled(ret->window, FALSE); }else { ERR("InitWindow failed: %08lx\n", nsres); } nsres = nsIWebBrowser_SetParentURIContentListener(ret->webbrowser, NSURICL(ret)); if(NS_FAILED(nsres)) ERR("SetParentURIContentListener failed: %08lx\n", nsres); return ret; }