[PATCH] wmp: Implement IWMPPlayer_get_URL and IWMPMedia_get_sourceURL

Anton Romanov theli.ua at gmail.com
Sat Mar 10 01:26:36 CST 2018


Signed-off-by: Anton Romanov <theli.ua at gmail.com>
---
 dlls/wmp/player.c       |  5 +++--
 dlls/wmp/tests/oleobj.c | 10 ++++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c
index cb8e074103..6c68240fa8 100644
--- a/dlls/wmp/player.c
+++ b/dlls/wmp/player.c
@@ -1577,8 +1577,9 @@ static HRESULT WINAPI WMPMedia_get_isIdentical(IWMPMedia *iface, IWMPMedia *othe
 static HRESULT WINAPI WMPMedia_get_sourceURL(IWMPMedia *iface, BSTR *pbstrSourceUrl)
 {
     WMPMedia *This = impl_from_IWMPMedia(iface);
-    FIXME("(%p)->(%p)\n", This, pbstrSourceUrl);
-    return E_NOTIMPL;
+    TRACE("(%p)->(%p)\n", This, pbstrSourceUrl);
+    *pbstrSourceUrl = SysAllocString(This->url);
+    return S_OK;
 }
 
 static HRESULT WINAPI WMPMedia_get_name(IWMPMedia *iface, BSTR *pbstrName)
diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c
index ae93d79dcd..608a8e771e 100644
--- a/dlls/wmp/tests/oleobj.c
+++ b/dlls/wmp/tests/oleobj.c
@@ -955,8 +955,8 @@ static void test_wmp_ifaces(IOleObject *oleobj)
     url = NULL;
     SET_EXPECT(Invoke_USERMODE);
     hres = IWMPPlayer4_get_URL(player4, &url);
-    todo_wine ok(hres == S_OK, "IWMPPlayer4_get_URL failed: %08x\n", hres);
-    todo_wine ok(0 == lstrcmpW(url, filename), "%s != %s", wine_dbgstr_w(url), wine_dbgstr_w(filename));
+    ok(hres == S_OK, "IWMPPlayer4_get_URL failed: %08x\n", hres);
+    ok(0 == lstrcmpW(url, filename), "%s != %s", wine_dbgstr_w(url), wine_dbgstr_w(filename));
     todo_wine CHECK_CALLED(Invoke_USERMODE);
     SysFreeString(url);
 
@@ -964,6 +964,12 @@ static void test_wmp_ifaces(IOleObject *oleobj)
     ok(hres == S_OK, "get_currentMedia failed: %08x\n", hres);
     ok(media != NULL, "media = (%p)\n", media);
 
+    url = NULL;
+    hres = IWMPMedia_get_sourceURL(media, &url);
+    ok(hres == S_OK, "IWMPPlayer4_get_URL failed: %08x\n", hres);
+    ok(0 == lstrcmpW(url, filename), "%s != %s", wine_dbgstr_w(url), wine_dbgstr_w(filename));
+    SysFreeString(url);
+
     SET_EXPECT(GetContainer);
     hres = IWMPPlayer4_put_currentMedia(player4, media);
     ok(hres == S_OK, "put_currentMedia failed: %08x\n", hres);
-- 
2.16.2




More information about the wine-devel mailing list