wmp: Implement get_versionInfo().

This commit is contained in:
Nikolay Sivov 2014-06-14 09:11:29 +04:00 committed by Alexandre Julliard
parent 88f17cdb54
commit 99449fc8d4
5 changed files with 28 additions and 5 deletions

View File

@ -1,5 +1,5 @@
MODULE = wmp.dll
IMPORTS = user32 gdi32
IMPORTS = user32 gdi32 oleaut32
C_SRCS = \
oleobj.c \

View File

@ -159,11 +159,18 @@ static HRESULT WINAPI WMPPlayer4_get_playlistCollection(IWMPPlayer4 *iface, IWMP
return E_NOTIMPL;
}
static HRESULT WINAPI WMPPlayer4_get_versionInfo(IWMPPlayer4 *iface, BSTR *pbstrVersionInfo)
static HRESULT WINAPI WMPPlayer4_get_versionInfo(IWMPPlayer4 *iface, BSTR *version)
{
static const WCHAR versionW[] = {'1','2','.','0','.','7','6','0','1','.','1','6','9','8','2',0};
WindowsMediaPlayer *This = impl_from_IWMPPlayer4(iface);
FIXME("(%p)->(%p)\n", This, pbstrVersionInfo);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, version);
if (!version)
return E_POINTER;
*version = SysAllocString(versionW);
return *version ? S_OK : E_OUTOFMEMORY;
}
static HRESULT WINAPI WMPPlayer4_launchURL(IWMPPlayer4 *iface, BSTR url)

View File

@ -23,6 +23,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: wmp.rgs */
2 WINE_REGISTRY wmp.rgs
/* NOTE: when changing version value, update a string returned by
get_versionInfo() as well */
#define WINE_FILEDESCRIPTION_STR "Wine Media Player"
#define WINE_FILENAME_STR "wmp.dll"
#define WINE_FILEVERSION 12,0,7601,16982

View File

@ -1,4 +1,4 @@
TESTDLL = wmp.dll
IMPORTS = ole32 user32
IMPORTS = ole32 oleaut32 user32
C_SRCS = oleobj.c

View File

@ -864,12 +864,14 @@ static void test_wmp(void)
IOleInPlaceObject *ipobj;
IPersistStreamInit *psi;
IOleObject *oleobj;
IWMPCore *wmpcore;
DWORD misc_status;
RECT pos = {0,0,100,100};
HWND hwnd;
GUID guid;
LONG ref;
HRESULT hres;
BSTR str;
hres = CoCreateInstance(&CLSID_WindowsMediaPlayer, NULL, CLSCTX_INPROC_SERVER, &IID_IOleObject, (void**)&oleobj);
if(hres == REGDB_E_CLASSNOTREG) {
@ -878,6 +880,18 @@ static void test_wmp(void)
}
ok(hres == S_OK, "Coult not create CLSID_WindowsMediaPlayer instance: %08x\n", hres);
hres = IOleObject_QueryInterface(oleobj, &IID_IWMPCore, (void**)&wmpcore);
ok(hres == S_OK, "got 0x%08x\n", hres);
hres = IWMPCore_get_versionInfo(wmpcore, NULL);
ok(hres == E_POINTER, "got 0x%08x\n", hres);
hres = IWMPCore_get_versionInfo(wmpcore, &str);
ok(hres == S_OK, "got 0x%08x\n", hres);
SysFreeString(str);
IWMPCore_Release(wmpcore);
hres = IOleObject_QueryInterface(oleobj, &IID_IProvideClassInfo2, (void**)&class_info);
ok(hres == S_OK, "Could not get IProvideClassInfo2 iface: %08x\n", hres);