mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
7da7ae71d2
Patches directly from the mailing list with second sign-off if supplied.
68 lines
2.2 KiB
Diff
68 lines
2.2 KiB
Diff
From 0c8b27474062d1908a821c4887fb49d8f5711406 Mon Sep 17 00:00:00 2001
|
|
From: Nikolay Sivov <nsivov@codeweavers.com>
|
|
Date: Tue, 31 Jul 2018 15:40:08 +0300
|
|
Subject: [PATCH 19/24] wmp: Make it possible to query IUnknown from
|
|
IWMPControls.
|
|
|
|
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 97fd66b..56b408f 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 6dfaa1c..472b985 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 */
|
|
--
|
|
1.9.1
|
|
|