Commit 354fa7eb authored by Anton Romanov's avatar Anton Romanov Committed by Alexandre Julliard

wmp: Add IWMPPlayer interface.

parent a48ecc7e
...@@ -264,6 +264,9 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v ...@@ -264,6 +264,9 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v
}else if(IsEqualGUID(riid, &IID_IWMPPlayer4)) { }else if(IsEqualGUID(riid, &IID_IWMPPlayer4)) {
TRACE("(%p)->(IID_IWMPPlayer4 %p)\n", This, ppv); TRACE("(%p)->(IID_IWMPPlayer4 %p)\n", This, ppv);
*ppv = &This->IWMPPlayer4_iface; *ppv = &This->IWMPPlayer4_iface;
}else if(IsEqualGUID(riid, &IID_IWMPPlayer)) {
TRACE("(%p)->(IID_IWMPPlayer %p)\n", This, ppv);
*ppv = &This->IWMPPlayer_iface;
}else if(IsEqualGUID(riid, &IID_IWMPSettings)) { }else if(IsEqualGUID(riid, &IID_IWMPSettings)) {
TRACE("(%p)->(IID_IWMPSettings %p)\n", This, ppv); TRACE("(%p)->(IID_IWMPSettings %p)\n", This, ppv);
*ppv = &This->IWMPSettings_iface; *ppv = &This->IWMPSettings_iface;
......
...@@ -792,6 +792,7 @@ static void test_wmp_ifaces(IOleObject *oleobj) ...@@ -792,6 +792,7 @@ static void test_wmp_ifaces(IOleObject *oleobj)
{ {
IWMPSettings *settings, *settings_qi; IWMPSettings *settings, *settings_qi;
IWMPPlayer4 *player4; IWMPPlayer4 *player4;
IWMPPlayer *player;
HRESULT hres; HRESULT hres;
hres = IOleObject_QueryInterface(oleobj, &IID_IWMPPlayer4, (void**)&player4); hres = IOleObject_QueryInterface(oleobj, &IID_IWMPPlayer4, (void**)&player4);
...@@ -809,6 +810,22 @@ static void test_wmp_ifaces(IOleObject *oleobj) ...@@ -809,6 +810,22 @@ static void test_wmp_ifaces(IOleObject *oleobj)
IWMPSettings_Release(settings); IWMPSettings_Release(settings);
IWMPPlayer4_Release(player4); IWMPPlayer4_Release(player4);
hres = IOleObject_QueryInterface(oleobj, &IID_IWMPPlayer, (void**)&player);
ok(hres == S_OK, "Could not get IWMPPlayer iface: %08x\n", hres);
settings = NULL;
hres = IWMPPlayer_get_settings(player, &settings);
ok(hres == S_OK, "get_settings failed: %08x\n", hres);
ok(settings != NULL, "settings = NULL\n");
hres = IOleObject_QueryInterface(oleobj, &IID_IWMPSettings, (void**)&settings_qi);
ok(hres == S_OK, "Could not get IWMPSettings iface: %08x\n", hres);
ok(settings == settings_qi, "settings != settings_qi\n");
IWMPSettings_Release(settings_qi);
IWMPSettings_Release(settings);
IWMPPlayer_Release(player);
} }
#define test_rect_size(a,b,c) _test_rect_size(__LINE__,a,b,c) #define test_rect_size(a,b,c) _test_rect_size(__LINE__,a,b,c)
......
...@@ -30,6 +30,7 @@ struct WindowsMediaPlayer { ...@@ -30,6 +30,7 @@ struct WindowsMediaPlayer {
IConnectionPointContainer IConnectionPointContainer_iface; IConnectionPointContainer IConnectionPointContainer_iface;
IOleControl IOleControl_iface; IOleControl IOleControl_iface;
IWMPPlayer4 IWMPPlayer4_iface; IWMPPlayer4 IWMPPlayer4_iface;
IWMPPlayer IWMPPlayer_iface;
IWMPSettings IWMPSettings_iface; IWMPSettings IWMPSettings_iface;
LONG ref; LONG ref;
......
...@@ -1008,6 +1008,31 @@ library WMPLib { ...@@ -1008,6 +1008,31 @@ library WMPLib {
} }
[ [
odl,
uuid(6BF52A4F-394A-11D3-B153-00C04F79FAA6),
dual,
oleautomation
]
interface IWMPPlayer : IWMPCore {
[id(0x00000013), propget]
HRESULT enabled([out, retval] VARIANT_BOOL* pbEnabled);
[id(0x00000013), propput]
HRESULT enabled([in] VARIANT_BOOL pbEnabled);
[id(0x00000015), propget]
HRESULT fullScreen([out, retval] VARIANT_BOOL* pbFullScreen);
[id(0x00000015), propput]
HRESULT fullScreen(VARIANT_BOOL pbFullScreen);
[id(0x00000016), propget]
HRESULT enableContextMenu([out, retval] VARIANT_BOOL* pbEnableContextMenu);
[id(0x00000016), propput]
HRESULT enableContextMenu(VARIANT_BOOL pbEnableContextMenu);
[id(0x00000017), propput]
HRESULT uiMode([in] BSTR pbstrMode);
[id(0x00000017), propget]
HRESULT uiMode([out, retval] BSTR* pbstrMode);
};
[
odl, odl,
uuid(82a2986c-0293-4fd0-b279-b21b86c058be), uuid(82a2986c-0293-4fd0-b279-b21b86c058be),
oleautomation oleautomation
...@@ -1406,7 +1431,7 @@ library WMPLib { ...@@ -1406,7 +1431,7 @@ library WMPLib {
[default] interface IWMPPlayer4; [default] interface IWMPPlayer4;
/* interface IWMPPlayer3; */ /* interface IWMPPlayer3; */
/* interface IWMPPlayer2; */ /* interface IWMPPlayer2; */
/* interface IWMPPlayer; */ interface IWMPPlayer;
interface IWMPControls; interface IWMPControls;
interface IWMPSettings; interface IWMPSettings;
interface IWMPPlaylist; interface IWMPPlaylist;
......
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