From 6cbf44b5e67874618e260dd995e9c43e254921ff Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 24 Feb 2014 13:03:49 +0100 Subject: [PATCH] wmp: Added IOleControl stub implementation. --- dlls/wmp/oleobj.c | 65 ++++++++++++++++++++++++++++++++++++++++++ dlls/wmp/wmp_private.h | 1 + 2 files changed, 66 insertions(+) diff --git a/dlls/wmp/oleobj.c b/dlls/wmp/oleobj.c index c081bf82d49..6f11d95af37 100644 --- a/dlls/wmp/oleobj.c +++ b/dlls/wmp/oleobj.c @@ -261,6 +261,9 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v }else if(IsEqualGUID(riid, &IID_IWMPPlayer4)) { TRACE("(%p)->(IID_IWMPPlayer4 %p)\n", This, ppv); *ppv = &This->IWMPPlayer4_iface; + }else if(IsEqualGUID(riid, &IID_IOleControl)) { + TRACE("(%p)->(IID_IOleControl %p)\n", This, ppv); + *ppv = &This->IOleControl_iface; }else { FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); *ppv = NULL; @@ -645,6 +648,67 @@ static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = { OleInPlaceObjectWindowless_GetDropTarget }; +static inline WindowsMediaPlayer *impl_from_IOleControl(IOleControl *iface) +{ + return CONTAINING_RECORD(iface, WindowsMediaPlayer, IOleControl_iface); +} + +static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID riid, void **ppv) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + return IOleObject_QueryInterface(&This->IOleObject_iface, riid, ppv); +} + +static ULONG WINAPI OleControl_AddRef(IOleControl *iface) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + return IOleObject_AddRef(&This->IOleObject_iface); +} + +static ULONG WINAPI OleControl_Release(IOleControl *iface) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + return IOleObject_AddRef(&This->IOleObject_iface); +} + +static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%p)\n", This, pCI); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *msg) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%p)\n", This, msg); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%d)\n", This, dispID); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL freeze) +{ + WindowsMediaPlayer *This = impl_from_IOleControl(iface); + FIXME("(%p)->(%x)\n", This, freeze); + return E_NOTIMPL; +} + +static const IOleControlVtbl OleControlVtbl = { + OleControl_QueryInterface, + OleControl_AddRef, + OleControl_Release, + OleControl_GetControlInfo, + OleControl_OnMnemonic, + OleControl_OnAmbientPropertyChange, + OleControl_FreezeEvents +}; + static inline WindowsMediaPlayer *impl_from_IProvideClassInfo2(IProvideClassInfo2 *iface) { return CONTAINING_RECORD(iface, WindowsMediaPlayer, IProvideClassInfo2_iface); @@ -851,6 +915,7 @@ HRESULT WINAPI WMPFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, wmp->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; wmp->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl; wmp->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; + wmp->IOleControl_iface.lpVtbl = &OleControlVtbl; wmp->ref = 1; diff --git a/dlls/wmp/wmp_private.h b/dlls/wmp/wmp_private.h index 11d4c2232f3..0969dca5350 100644 --- a/dlls/wmp/wmp_private.h +++ b/dlls/wmp/wmp_private.h @@ -28,6 +28,7 @@ struct WindowsMediaPlayer { IPersistStreamInit IPersistStreamInit_iface; IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; IConnectionPointContainer IConnectionPointContainer_iface; + IOleControl IOleControl_iface; IWMPPlayer4 IWMPPlayer4_iface; LONG ref;