wmp: Ignore IMarshal/IRunnableObject interfaces in IOleObject_QueryInterface.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2017-07-31 05:59:21 +00:00 committed by Alexandre Julliard
parent 75d030ed13
commit f9e995de42
2 changed files with 11 additions and 1 deletions

View File

@ -219,6 +219,8 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v
{
WindowsMediaPlayer *This = impl_from_IOleObject(iface);
*ppv = NULL;
if(IsEqualGUID(riid, &IID_IUnknown)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = &This->IOleObject_iface;
@ -267,9 +269,14 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v
}else if(IsEqualGUID(riid, &IID_IOleControl)) {
TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv);
*ppv = &This->IOleControl_iface;
}else if(IsEqualGUID(riid, &IID_IMarshal)) {
TRACE("(%p)->(IID_IMarshal %p)\n", This, ppv);
return E_NOINTERFACE;
}else if(IsEqualGUID(riid, &IID_IQuickActivate)) {
TRACE("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
return E_NOINTERFACE;
}else {
FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
*ppv = NULL;
return E_NOINTERFACE;
}

View File

@ -848,6 +848,9 @@ static void test_QI(IUnknown *unk)
hres = IUnknown_QueryInterface(unk, &IID_IQuickActivate, (void**)&tmp);
ok(hres == E_NOINTERFACE, "Got IQuickActivate iface when no expected\n");
hres = IUnknown_QueryInterface(unk, &IID_IMarshal, (void**)&tmp);
ok(hres == E_NOINTERFACE, "Could not get IMarshal iface: %08x\n", hres);
hres = IUnknown_QueryInterface(unk, &IID_IOleInPlaceObjectWindowless, (void**)&tmp);
ok(hres == S_OK, "Could not get IOleInPlaceObjectWindowless iface: %08x\n", hres);
IUnknown_Release(tmp);