Commit 99449fc8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

wmp: Implement get_versionInfo().

parent 88f17cdb
MODULE = wmp.dll MODULE = wmp.dll
IMPORTS = user32 gdi32 IMPORTS = user32 gdi32 oleaut32
C_SRCS = \ C_SRCS = \
oleobj.c \ oleobj.c \
......
...@@ -159,11 +159,18 @@ static HRESULT WINAPI WMPPlayer4_get_playlistCollection(IWMPPlayer4 *iface, IWMP ...@@ -159,11 +159,18 @@ static HRESULT WINAPI WMPPlayer4_get_playlistCollection(IWMPPlayer4 *iface, IWMP
return E_NOTIMPL; 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); 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) static HRESULT WINAPI WMPPlayer4_launchURL(IWMPPlayer4 *iface, BSTR url)
......
...@@ -23,6 +23,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL ...@@ -23,6 +23,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: wmp.rgs */ /* @makedep: wmp.rgs */
2 WINE_REGISTRY 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_FILEDESCRIPTION_STR "Wine Media Player"
#define WINE_FILENAME_STR "wmp.dll" #define WINE_FILENAME_STR "wmp.dll"
#define WINE_FILEVERSION 12,0,7601,16982 #define WINE_FILEVERSION 12,0,7601,16982
......
TESTDLL = wmp.dll TESTDLL = wmp.dll
IMPORTS = ole32 user32 IMPORTS = ole32 oleaut32 user32
C_SRCS = oleobj.c C_SRCS = oleobj.c
...@@ -864,12 +864,14 @@ static void test_wmp(void) ...@@ -864,12 +864,14 @@ static void test_wmp(void)
IOleInPlaceObject *ipobj; IOleInPlaceObject *ipobj;
IPersistStreamInit *psi; IPersistStreamInit *psi;
IOleObject *oleobj; IOleObject *oleobj;
IWMPCore *wmpcore;
DWORD misc_status; DWORD misc_status;
RECT pos = {0,0,100,100}; RECT pos = {0,0,100,100};
HWND hwnd; HWND hwnd;
GUID guid; GUID guid;
LONG ref; LONG ref;
HRESULT hres; HRESULT hres;
BSTR str;
hres = CoCreateInstance(&CLSID_WindowsMediaPlayer, NULL, CLSCTX_INPROC_SERVER, &IID_IOleObject, (void**)&oleobj); hres = CoCreateInstance(&CLSID_WindowsMediaPlayer, NULL, CLSCTX_INPROC_SERVER, &IID_IOleObject, (void**)&oleobj);
if(hres == REGDB_E_CLASSNOTREG) { if(hres == REGDB_E_CLASSNOTREG) {
...@@ -878,6 +880,18 @@ static void test_wmp(void) ...@@ -878,6 +880,18 @@ static void test_wmp(void)
} }
ok(hres == S_OK, "Coult not create CLSID_WindowsMediaPlayer instance: %08x\n", hres); 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); hres = IOleObject_QueryInterface(oleobj, &IID_IProvideClassInfo2, (void**)&class_info);
ok(hres == S_OK, "Could not get IProvideClassInfo2 iface: %08x\n", hres); ok(hres == S_OK, "Could not get IProvideClassInfo2 iface: %08x\n", hres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment