wmp: Implement IWMPPlayer_get_URL and IWMPMedia_get_sourceURL.

Signed-off-by: Anton Romanov <theli.ua@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Romanov 2018-03-09 23:26:36 -08:00 committed by Alexandre Julliard
parent e24af9660a
commit 84068b6d97
2 changed files with 11 additions and 4 deletions

View File

@ -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)

View File

@ -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);