Jacek Caban : wmp: Added IOleControl stub implementation.
Alexandre Julliard
julliard at winehq.org
Mon Feb 24 15:42:31 CST 2014
Module: wine
Branch: master
Commit: 6cbf44b5e67874618e260dd995e9c43e254921ff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6cbf44b5e67874618e260dd995e9c43e254921ff
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Feb 24 13:03:49 2014 +0100
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 c081bf8..6f11d95 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 11d4c22..0969dca 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;
More information about the wine-cvs
mailing list