Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wmp/player.c | 4 +++- dlls/wmp/tests/oleobj.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c index 97fd66b79c..56b408f5b1 100644 --- a/dlls/wmp/player.c +++ b/dlls/wmp/player.c @@ -1365,7 +1365,9 @@ static const IWMPNetworkVtbl WMPNetworkVtbl = {
static HRESULT WINAPI WMPControls_QueryInterface(IWMPControls *iface, REFIID riid, void **ppv) { - if(IsEqualGUID(riid, &IID_IDispatch)) { + if(IsEqualGUID(riid, &IID_IUnknown)) { + *ppv = iface; + }else if(IsEqualGUID(riid, &IID_IDispatch)) { *ppv = iface; }else if(IsEqualGUID(riid, &IID_IWMPControls)) { *ppv = iface; diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c index 6dfaa1c9e1..472b985244 100644 --- a/dlls/wmp/tests/oleobj.c +++ b/dlls/wmp/tests/oleobj.c @@ -889,7 +889,6 @@ static void test_ConnectionPoint(IOleObject *unk) IConnectionPoint_Release(point); }
- static void test_wmp_ifaces(IOleObject *oleobj) { IWMPSettings *settings, *settings_qi; @@ -899,6 +898,7 @@ static void test_wmp_ifaces(IOleObject *oleobj) IWMPControls *controls; VARIANT_BOOL vbool; IWMPNetwork *network; + IUnknown *unk; HRESULT hres; BSTR filename; BSTR url; @@ -913,9 +913,15 @@ static void test_wmp_ifaces(IOleObject *oleobj)
player = NULL; hres = IWMPControls_QueryInterface(controls, &IID_IWMPPlayer, (void**)&player); - ok(hres != S_OK, "Getting IWMPPlayer from IWMPControls SUCCEEDED\n"); + ok(hres == E_NOINTERFACE, "Getting IWMPPlayer from IWMPControls SUCCEEDED\n"); ok(player == NULL, "player != NULL\n");
+ unk = NULL; + hres = IWMPControls_QueryInterface(controls, &IID_IUnknown, (void **)&unk); + ok(hres == S_OK, "Failed to get IUnknown, hr %#x.\n", hres); + ok(unk != NULL, "Unexpected interface pointer.\n"); + IUnknown_Release(unk); + IWMPControls_Release(controls);
/* IWPNetwork */