Anton Romanov : wmp: Implement IWMPPlayer_get_URL and IWMPMedia_get_sourceURL.
Alexandre Julliard
julliard at winehq.org
Mon Mar 12 17:40:25 CDT 2018
Module: wine
Branch: master
Commit: 84068b6d97fcd0443fe111bae9b0f457e18eff8b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=84068b6d97fcd0443fe111bae9b0f457e18eff8b
Author: Anton Romanov <theli.ua at gmail.com>
Date: Fri Mar 9 23:26:36 2018 -0800
wmp: Implement IWMPPlayer_get_URL and IWMPMedia_get_sourceURL.
Signed-off-by: Anton Romanov <theli.ua at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 cb8e074..6c68240 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 ae93d79..937960c 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, "IWMPMedia_get_sourceURL 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);
More information about the wine-cvs
mailing list