Commit d998bc54 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

ieframe: Implement IOleObject::GetUserClassID().

parent 25853da0
......@@ -719,11 +719,14 @@ static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
return E_NOTIMPL;
}
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID* pClsid)
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID *pClsid)
{
WebBrowser *This = impl_from_IOleObject(iface);
FIXME("(%p)->(%p)\n", This, pClsid);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, pClsid);
*pClsid = This->version == 1 ? CLSID_WebBrowser_V1 : CLSID_WebBrowser;
return S_OK;
}
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType,
......
......@@ -2227,7 +2227,7 @@ static void test_Persist(IWebBrowser2 *wb, int version)
HRESULT hr;
hr = IWebBrowser2_QueryInterface(wb, &IID_IPersist, (void **)&persist);
ok(hr == S_OK, "QueryInterface(IID_IPersist failed: %08x\n", hr);
ok(hr == S_OK, "QueryInterface(IID_IPersist) failed: %08x\n", hr);
hr = IPersist_GetClassID(persist, &guid);
ok(hr == S_OK, "GetClassID failed: %08x\n", hr);
......@@ -2239,6 +2239,25 @@ static void test_Persist(IWebBrowser2 *wb, int version)
IPersist_Release(persist);
}
static void test_OleObject(IWebBrowser2 *wb, int version)
{
IOleObject *oleobj;
CLSID clsid;
HRESULT hr;
hr = IWebBrowser2_QueryInterface(wb, &IID_IOleObject, (void **)&oleobj);
ok(hr == S_OK, "QueryInterface(IID_IOleObject) failed: %08x\n", hr);
hr = IOleObject_GetUserClassID(oleobj, &clsid);
ok(hr == S_OK, "GetUserClassID failed: %08x\n", hr);
if (version == 1)
ok(IsEqualGUID(&clsid, &CLSID_WebBrowser_V1), "got wrong CLSID: %s\n", wine_dbgstr_guid(&clsid));
else
ok(IsEqualGUID(&clsid, &CLSID_WebBrowser), "got wrong CLSID: %s\n", wine_dbgstr_guid(&clsid));
IOleObject_Release(oleobj);
}
static void test_ie_funcs(IWebBrowser2 *wb)
{
IDispatch *disp;
......@@ -3761,6 +3780,7 @@ static void test_WebBrowser(DWORD flags, BOOL do_close)
test_Navigate2(webbrowser, L"about:blank");
test_QueryStatusWB(webbrowser, TRUE);
test_Persist(webbrowser, 2);
test_OleObject(webbrowser, 2);
if(do_download) {
IHTMLDocument2 *doc, *doc2;
......@@ -3870,6 +3890,7 @@ static void test_WebBrowserV1(void)
test_ClassInfo(wb);
test_EnumVerbs(wb);
test_Persist(wb, 1);
test_OleObject(wb, 1);
ref = IWebBrowser2_Release(wb);
ok(ref == 0, "ref=%d, expected 0\n", ref);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment