HRESULT register_class_object(BOOL do_reg) { HRESULT hres; - static DWORD cookie; + static DWORD ie_cookie, iem_cookie; if(do_reg) { hres = CoRegisterClassObject(&CLSID_InternetExplorer, (IUnknown*)&InternetExplorerFactory, CLSCTX_SERVER, - REGCLS_MULTIPLEUSE|REGCLS_SUSPENDED, &cookie); - if (FAILED(hres)) { + REGCLS_MULTIPLEUSE, &ie_cookie); + if (FAILED(hres)) + ERR("failed to register object %08x\n", hres); + hres = CoRegisterClassObject(&CLSID_InternetExplorerManager, + (IUnknown*)&InternetExplorerManagerFactory, CLSCTX_SERVER, + REGCLS_MULTIPLEUSE, &iem_cookie); + if (FAILED(hres)) ERR("failed to register object %08x\n", hres); - return hres; - } - - hres = CoResumeClassObjects(); - if(SUCCEEDED(hres)) - return hres; - - ERR("failed to resume object %08x\n", hres); } - - return CoRevokeClassObject(cookie); + else + { + hres = CoRevokeClassObject(ie_cookie); + if (FAILED(hres)) + ERR("failed to register object %08x\n", hres); + hres = CoRevokeClassObject(iem_cookie); + if (FAILED(hres)) + ERR("failed to register object %08x\n", hres); + } + return hres; }
+static HRESULT WINAPI InternetExplorerManager_CreateObject(IInternetExplorerManager *iface, DWORD config, LPCWSTR url, REFIID riid, void **ppv) +{ + FIXME("(%p)->(0x%x, %s, %s, %p) semi-stub\n", iface, config, debugstr_w(url), debugstr_guid(riid), ppv); + + return CoCreateInstance(&CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, riid, ppv); +}