Vijay Kiran Kamuju : dhtmled.ocx: Add stub IOleControl interface.

Alexandre Julliard julliard at winehq.org
Tue Oct 26 09:40:26 CDT 2021


Module: wine
Branch: stable
Commit: b973686abc78b422d6faa5e1f39b9a767f0a04cd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b973686abc78b422d6faa5e1f39b9a767f0a04cd

Author: Vijay Kiran Kamuju <infyquest at gmail.com>
Date:   Sat Apr  3 20:39:49 2021 +0200

dhtmled.ocx: Add stub IOleControl interface.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50916
Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 95538bb5d33e0a7a434e33b9a833ad47639cefc8)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/dhtmled.ocx/edit.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c
index 53dcdfc9ac6..e111f0b7979 100644
--- a/dlls/dhtmled.ocx/edit.c
+++ b/dlls/dhtmled.ocx/edit.c
@@ -30,6 +30,7 @@ typedef struct
     IDHTMLEdit IDHTMLEdit_iface;
     IOleObject IOleObject_iface;
     IPersistStreamInit IPersistStreamInit_iface;
+    IOleControl IOleControl_iface;
     IOleClientSite *client_site;
     SIZEL extent;
     LONG ref;
@@ -50,6 +51,11 @@ static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *if
     return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface);
 }
 
+static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface)
+{
+    return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface);
+}
+
 static ULONG dhtml_edit_addref(DHTMLEditImpl *This)
 {
     LONG ref = InterlockedIncrement(&This->ref);
@@ -83,6 +89,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out)
         *out = &This->IPersistStreamInit_iface;
         return S_OK;
     }
+    else if(IsEqualGUID(iid, &IID_IOleControl))
+    {
+        dhtml_edit_addref(This);
+        *out = &This->IOleControl_iface;
+        return S_OK;
+    }
 
     *out = NULL;
     ERR("no interface for %s\n", debugstr_guid(iid));
@@ -858,6 +870,59 @@ static const IPersistStreamInitVtbl PersistStreamInitVtbl = {
     PersistStreamInit_InitNew
 };
 
+static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface, REFIID iid, void **out)
+{
+    return dhtml_edit_qi(impl_from_IOleControl(iface), iid, out);
+}
+
+static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
+{
+    return dhtml_edit_addref(impl_from_IOleControl(iface));
+}
+
+static ULONG WINAPI OleControl_Release(IOleControl *iface)
+{
+    return dhtml_edit_release(impl_from_IOleControl(iface));
+}
+
+static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, CONTROLINFO *pCI)
+{
+    DHTMLEditImpl *This = impl_from_IOleControl(iface);
+    FIXME("(%p)->(%p)\n", This, pCI);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, MSG *msg)
+{
+    DHTMLEditImpl *This = impl_from_IOleControl(iface);
+    FIXME("(%p)->(%p)\n", This, msg);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
+{
+    DHTMLEditImpl *This = impl_from_IOleControl(iface);
+    FIXME("(%p)->(%d)\n", This, dispID);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL freeze)
+{
+    DHTMLEditImpl *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
+};
+
 HRESULT dhtml_edit_create(REFIID iid, void **out)
 {
     DHTMLEditImpl *This;
@@ -874,6 +939,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out)
     This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl;
     This->IOleObject_iface.lpVtbl = &OleObjectVtbl;
     This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl;
+    This->IOleControl_iface.lpVtbl = &OleControlVtbl;
     This->client_site = NULL;
     This->ref = 1;
 




More information about the wine-cvs mailing list