HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv) { InternetExplorer *ret; HRESULT hres; TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv); ret = heap_alloc(sizeof(InternetExplorer)); ret->ref = 0; ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret); DocHost_Init(&ret->doc_host, (IDispatch*)WEBBROWSER2(ret)); InternetExplorer_WebBrowser_Init(ret); create_frame_hwnd(ret); ret->doc_host.frame_hwnd = ret->frame_hwnd; hres = IWebBrowser2_QueryInterface(WEBBROWSER2(ret), riid, ppv); if(FAILED(hres)) { heap_free(ret); return hres; } return hres; }
static void test_html_window(IWebBrowser2 *wb) { IHTMLWindow2 *html_window; IServiceProvider *sp; HRESULT hres; hres = IWebBrowser2_QueryInterface(wb, &IID_IServiceProvider, (void**)&sp); ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres); hres = IServiceProvider_QueryService(sp, &SID_SHTMLWindow, &IID_IHTMLWindow2, (void**)&html_window); IServiceProvider_Release(sp); ok(hres == S_OK, "Could not get SHTMLWindow service: %08x\n", hres); IHTMLWindow2_Release(html_window); }
static HRESULT create_webbrowser(int version, IUnknown *outer, REFIID riid, void **ppv) { WebBrowser *ret; HRESULT hres; TRACE("(%p %s %p) version=%d\n", outer, debugstr_guid(riid), ppv, version); ret = heap_alloc_zero(sizeof(WebBrowser)); ret->IWebBrowser2_iface.lpVtbl = &WebBrowser2Vtbl; ret->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl; ret->ref = 1; ret->version = version; DocHost_Init(&ret->doc_host, &ret->IWebBrowser2_iface, &DocHostContainerVtbl); ret->visible = VARIANT_TRUE; ret->menu_bar = VARIANT_TRUE; ret->address_bar = VARIANT_TRUE; ret->status_bar = VARIANT_TRUE; ret->tool_bar = VARIANT_TRUE; WebBrowser_OleObject_Init(ret); WebBrowser_ViewObject_Init(ret); WebBrowser_Persist_Init(ret); WebBrowser_ClassInfo_Init(ret); HlinkFrame_Init(&ret->hlink_frame, (IUnknown*)&ret->IWebBrowser2_iface, &ret->doc_host); lock_module(); hres = IWebBrowser2_QueryInterface(&ret->IWebBrowser2_iface, riid, ppv); IWebBrowser2_Release(&ret->IWebBrowser2_iface); return hres; }
static HRESULT WINAPI IEServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppv) { InternetExplorer *This = impl_from_IServiceProvider(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); }
static HRESULT WINAPI WBOleCommandTarget_QueryInterface(IOleCommandTarget *iface, REFIID riid, void **ppv) { WebBrowser *This = impl_from_IOleCommandTarget(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); }
static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppv) { WebBrowser *This = impl_from_IOleInPlaceActiveObject(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); }
static HRESULT WINAPI HlinkFrame_QueryInterface(IHlinkFrame *iface, REFIID riid, void **ppv) { WebBrowser *This = HLINKFRAME_THIS(iface); return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv); }
static HRESULT WINAPI ExternalConnection_QueryInterface(IExternalConnection *iface, REFIID riid, void **ppv) { InternetExplorer *This = impl_from_IExternalConnection(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); }
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IOleControl(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); }
static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IOleInPlaceObject(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); }
static HRESULT WINAPI WBOleCommandTarget_QueryInterface(IOleCommandTarget *iface, REFIID riid, void **ppv) { WebBrowser *This = OLECMD_THIS(iface); return IWebBrowser2_QueryInterface(WEBBROWSER(This), riid, ppv); }
static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, REFIID riid, void **ppv) { WebBrowser *This = ACTIVEOBJ_THIS(iface); return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv); }
static HRESULT WINAPI ViewObject_QueryInterface(IViewObject2 *iface, REFIID riid, void **ppv) { WebBrowser *This = impl_from_IViewObject2(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppv); }
static HRESULT WINAPI DataObject_QueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj) { WebBrowser *This = impl_from_IDataObject(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppvObj); }
static HRESULT WINAPI ProvideClassInfo_QueryInterface(IProvideClassInfo2 *iface, REFIID riid, LPVOID *ppobj) { WebBrowser *This = impl_from_IProvideClassInfo2(iface); return IWebBrowser2_QueryInterface(&This->IWebBrowser2_iface, riid, ppobj); }