Commit 83c45eaa authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wmp: Added GetClientSite implementation.

parent 9a1f13cf
......@@ -137,8 +137,11 @@ static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, IOleClientSite
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, IOleClientSite **ppClientSite)
{
WindowsMediaPlayer *This = impl_from_IOleObject(iface);
FIXME("(%p)->(%p)\n", This, ppClientSite);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, ppClientSite);
*ppClientSite = This->client_site;
return This->client_site ? S_OK : E_FAIL;
}
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp, LPCOLESTR szContainerObj)
......
......@@ -627,6 +627,7 @@ static void test_QI(IUnknown *unk)
static void test_wmp(void)
{
IProvideClassInfo2 *class_info;
IOleClientSite *client_site;
IPersistStreamInit *psi;
IOleObject *oleobj;
GUID guid;
......@@ -667,9 +668,19 @@ static void test_wmp(void)
todo_wine CHECK_CALLED(GetWindow);
todo_wine CHECK_CALLED(Invoke_USERMODE);
client_site = NULL;
hres = IOleObject_GetClientSite(oleobj, &client_site);
ok(hres == S_OK, "GetClientSite failed: %08x\n", hres);
ok(client_site == &ClientSite, "client_site != ClientSite\n");
hres = IOleObject_SetClientSite(oleobj, NULL);
ok(hres == S_OK, "SetClientSite failed: %08x\n", hres);
client_site = (void*)0xdeadbeef;
hres = IOleObject_GetClientSite(oleobj, &client_site);
ok(hres == E_FAIL, "GetClientSite failed: %08x\n", hres);
ok(!client_site, "client_site = %p\n", client_site);
ref = IOleObject_Release(oleobj);
ok(!ref, "ref = %d\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