Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index fc518de7323..7772ec1538b 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -31,6 +31,7 @@ typedef struct IOleObject IOleObject_iface; IPersistStreamInit IPersistStreamInit_iface; IOleControl IOleControl_iface; + IConnectionPointContainer IConnectionPointContainer_iface; IOleClientSite *client_site; SIZEL extent; LONG ref; @@ -56,6 +57,11 @@ static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface); }
+static inline DHTMLEditImpl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IConnectionPointContainer_iface); +} + static ULONG dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -95,6 +101,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleControl_iface; return S_OK; } + else if(IsEqualGUID(iid, &IID_IConnectionPointContainer)) + { + dhtml_edit_addref(This); + *out = &This->IConnectionPointContainer_iface; + return S_OK; + }
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -923,6 +935,47 @@ static const IOleControlVtbl OleControlVtbl = { OleControl_FreezeEvents };
+static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, + REFIID iid, LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IConnectionPointContainer(iface), iid, out); +} + +static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface) +{ + return dhtml_edit_addref(impl_from_IConnectionPointContainer(iface)); +} + +static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface) +{ + return dhtml_edit_release(impl_from_IConnectionPointContainer(iface)); +} + +static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface, + IEnumConnectionPoints **ppEnum) +{ + DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface); + FIXME("(%p)->(%p)\n", This, ppEnum); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, + REFIID riid, IConnectionPoint **ppCP) +{ + DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface); + FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppCP); + return CONNECT_E_NOCONNECTION; +} + +static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = +{ + ConnectionPointContainer_QueryInterface, + ConnectionPointContainer_AddRef, + ConnectionPointContainer_Release, + ConnectionPointContainer_EnumConnectionPoints, + ConnectionPointContainer_FindConnectionPoint +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -940,6 +993,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; + This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->client_site = NULL; This->ref = 1;
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 7772ec1538b..55520b34607 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -31,6 +31,7 @@ typedef struct IOleObject IOleObject_iface; IPersistStreamInit IPersistStreamInit_iface; IOleControl IOleControl_iface; + IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; IConnectionPointContainer IConnectionPointContainer_iface; IOleClientSite *client_site; SIZEL extent; @@ -57,6 +58,11 @@ static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface); }
+static inline DHTMLEditImpl *impl_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleInPlaceObjectWindowless_iface); +} + static inline DHTMLEditImpl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) { return CONTAINING_RECORD(iface, DHTMLEditImpl, IConnectionPointContainer_iface); @@ -101,6 +107,14 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleControl_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IOleWindow) || + IsEqualGUID(iid, &IID_IOleInPlaceObject) || + IsEqualGUID(iid, &IID_IOleInPlaceObjectWindowless)) + { + dhtml_edit_addref(This); + *out = &This->IOleInPlaceObjectWindowless_iface; + return S_OK; + } else if(IsEqualGUID(iid, &IID_IConnectionPointContainer)) { dhtml_edit_addref(This); @@ -935,6 +949,96 @@ static const IOleControlVtbl OleControlVtbl = { OleControl_FreezeEvents };
+static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface, + REFIID iid, LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IOleInPlaceObjectWindowless(iface), iid, out); +} + +static ULONG WINAPI OleInPlaceObjectWindowless_AddRef(IOleInPlaceObjectWindowless *iface) +{ + return dhtml_edit_addref(impl_from_IOleInPlaceObjectWindowless(iface)); +} + +static ULONG WINAPI OleInPlaceObjectWindowless_Release(IOleInPlaceObjectWindowless *iface) +{ + return dhtml_edit_release(impl_from_IOleInPlaceObjectWindowless(iface)); +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_GetWindow(IOleInPlaceObjectWindowless *iface, HWND *phwnd) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)->(%p)\n", This, phwnd); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_ContextSensitiveHelp(IOleInPlaceObjectWindowless *iface, + BOOL fEnterMode) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)->(%x)\n", This, fEnterMode); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_InPlaceDeactivate(IOleInPlaceObjectWindowless *iface) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_UIDeactivate(IOleInPlaceObjectWindowless *iface) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_SetObjectRects(IOleInPlaceObjectWindowless *iface, + LPCRECT lprcPosRect, LPCRECT lprcClipRect) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_ReactivateAndUndo(IOleInPlaceObjectWindowless *iface) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_OnWindowMessage(IOleInPlaceObjectWindowless *iface, + UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *lpResult) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)->(%u %lu %lu %p)\n", This, msg, wParam, lParam, lpResult); + return E_NOTIMPL; +} + +static HRESULT WINAPI OleInPlaceObjectWindowless_GetDropTarget(IOleInPlaceObjectWindowless *iface, + IDropTarget **ppDropTarget) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceObjectWindowless(iface); + FIXME("(%p)->(%p)\n", This, ppDropTarget); + return E_NOTIMPL; +} + +static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = { + OleInPlaceObjectWindowless_QueryInterface, + OleInPlaceObjectWindowless_AddRef, + OleInPlaceObjectWindowless_Release, + OleInPlaceObjectWindowless_GetWindow, + OleInPlaceObjectWindowless_ContextSensitiveHelp, + OleInPlaceObjectWindowless_InPlaceDeactivate, + OleInPlaceObjectWindowless_UIDeactivate, + OleInPlaceObjectWindowless_SetObjectRects, + OleInPlaceObjectWindowless_ReactivateAndUndo, + OleInPlaceObjectWindowless_OnWindowMessage, + OleInPlaceObjectWindowless_GetDropTarget +}; + static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID iid, LPVOID *out) { @@ -993,6 +1097,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; + This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl; This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->client_site = NULL; This->ref = 1;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 55520b34607..8c6c92f05f7 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -29,6 +29,7 @@ typedef struct { IDHTMLEdit IDHTMLEdit_iface; IOleObject IOleObject_iface; + IProvideClassInfo2 IProvideClassInfo2_iface; IPersistStreamInit IPersistStreamInit_iface; IOleControl IOleControl_iface; IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; @@ -48,6 +49,11 @@ static inline DHTMLEditImpl *impl_from_IOleObject(IOleObject *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleObject_iface); }
+static inline DHTMLEditImpl *impl_from_IProvideClassInfo2(IProvideClassInfo2 *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IProvideClassInfo2_iface); +} + static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *iface) { return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface); @@ -95,6 +101,13 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleObject_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IProvideClassInfo) || + IsEqualGUID(iid, &IID_IProvideClassInfo2)) + { + dhtml_edit_addref(This); + *out = &This->IProvideClassInfo2_iface; + return S_OK; + } else if (IsEqualGUID(iid, &IID_IPersistStreamInit)) { dhtml_edit_addref(This); @@ -826,6 +839,43 @@ static const IOleObjectVtbl OleObjectVtbl = { OleObject_SetColorScheme };
+static HRESULT WINAPI ProvideClassInfo2_QueryInterface(IProvideClassInfo2 *iface, REFIID iid, LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IProvideClassInfo2(iface), iid, out); +} + +static ULONG WINAPI ProvideClassInfo2_AddRef(IProvideClassInfo2 *iface) +{ + return dhtml_edit_addref(impl_from_IProvideClassInfo2(iface)); +} + +static ULONG WINAPI ProvideClassInfo2_Release(IProvideClassInfo2 *iface) +{ + return dhtml_edit_release(impl_from_IProvideClassInfo2(iface)); +} + +static HRESULT WINAPI ProvideClassInfo2_GetClassInfo(IProvideClassInfo2 *iface, ITypeInfo **ppTI) +{ + DHTMLEditImpl *This = impl_from_IProvideClassInfo2(iface); + FIXME("(%p)->(%p)\n", This, ppTI); + return E_NOTIMPL; +} + +static HRESULT WINAPI ProvideClassInfo2_GetGUID(IProvideClassInfo2 *iface, DWORD dwGuidKind, GUID *pGUID) +{ + DHTMLEditImpl *This = impl_from_IProvideClassInfo2(iface); + FIXME("(%p)->(%d %p)\n", This, dwGuidKind, pGUID); + return E_NOTIMPL; +} + +static const IProvideClassInfo2Vtbl ProvideClassInfo2Vtbl = { + ProvideClassInfo2_QueryInterface, + ProvideClassInfo2_AddRef, + ProvideClassInfo2_Release, + ProvideClassInfo2_GetClassInfo, + ProvideClassInfo2_GetGUID +}; + static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface, REFIID iid, void **out) { return dhtml_edit_qi(impl_from_IPersistStreamInit(iface), iid, out); @@ -1095,6 +1145,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out)
This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; This->IOleObject_iface.lpVtbl = &OleObjectVtbl; + This->IProvideClassInfo2_iface.lpVtbl = &ProvideClassInfo2Vtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 166 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 8c6c92f05f7..7554aacbf8f 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -32,6 +32,7 @@ typedef struct IProvideClassInfo2 IProvideClassInfo2_iface; IPersistStreamInit IPersistStreamInit_iface; IOleControl IOleControl_iface; + IViewObjectEx IViewObjectEx_iface; IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; IConnectionPointContainer IConnectionPointContainer_iface; IOleClientSite *client_site; @@ -64,6 +65,11 @@ static inline DHTMLEditImpl *impl_from_IOleControl(IOleControl *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleControl_iface); }
+static inline DHTMLEditImpl *impl_from_IViewObjectEx(IViewObjectEx *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IViewObjectEx_iface); +} + static inline DHTMLEditImpl *impl_from_IOleInPlaceObjectWindowless(IOleInPlaceObjectWindowless *iface) { return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleInPlaceObjectWindowless_iface); @@ -120,6 +126,14 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleControl_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IViewObject) || + IsEqualGUID(iid, &IID_IViewObject2) || + IsEqualGUID(iid, &IID_IViewObjectEx)) + { + dhtml_edit_addref(This); + *out = &This->IViewObjectEx_iface; + return S_OK; + } else if (IsEqualGUID(iid, &IID_IOleWindow) || IsEqualGUID(iid, &IID_IOleInPlaceObject) || IsEqualGUID(iid, &IID_IOleInPlaceObjectWindowless)) @@ -999,6 +1013,157 @@ static const IOleControlVtbl OleControlVtbl = { OleControl_FreezeEvents };
+static HRESULT WINAPI ViewObjectEx_QueryInterface(IViewObjectEx *iface, REFIID iid, LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IViewObjectEx(iface), iid, out); +} + +static ULONG WINAPI ViewObjectEx_AddRef(IViewObjectEx *iface) +{ + return dhtml_edit_addref(impl_from_IViewObjectEx(iface)); +} + +static ULONG WINAPI ViewObjectEx_Release(IViewObjectEx *iface) +{ + return dhtml_edit_release(impl_from_IViewObjectEx(iface)); +} + +static HRESULT WINAPI ViewObjectEx_Draw(IViewObjectEx *iface, DWORD drawaspect, LONG index, void *aspect, + DVTARGETDEVICE *device, HDC target_dev, HDC hdc_draw, const RECTL *bounds, const RECTL *win_bounds, + BOOL (STDMETHODCALLTYPE *fn_continue)(ULONG_PTR cont), ULONG_PTR cont) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %lu)\n", This, drawaspect, index, aspect, device, target_dev, + hdc_draw, bounds, win_bounds, fn_continue, cont); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_GetColorSet(IViewObjectEx *iface, DWORD drawaspect, LONG index, void *aspect, + DVTARGETDEVICE *device, HDC hic_target, LOGPALETTE **colorset) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %d %p %p %p %p)\n", This, drawaspect, index, aspect, device, hic_target, + colorset); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_Freeze(IViewObjectEx *iface, DWORD drawaspect, LONG index, void *aspect, + DWORD *freeze) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %d %p %p)\n", This, drawaspect, index, aspect, freeze); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_Unfreeze(IViewObjectEx *iface, DWORD freeze) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d)\n", This, freeze); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_SetAdvise(IViewObjectEx *iface, DWORD aspects, DWORD advf, IAdviseSink *sink) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %d %p)\n", This, aspects, advf, sink); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_GetAdvise(IViewObjectEx *iface, DWORD *aspects, DWORD *advf, IAdviseSink **sink) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%p %p %p)\n", This, aspects, advf, sink); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_GetExtent(IViewObjectEx *iface, DWORD draw_aspect, LONG index, + DVTARGETDEVICE *device, SIZEL *size) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %d %p %p)\n", This, draw_aspect, index, device, size); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_GetRect(IViewObjectEx *iface, DWORD aspect, RECTL *rect) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %p)\n", This, aspect, rect); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_GetViewStatus(IViewObjectEx *iface, DWORD *status) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%p)\n", This, status); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_QueryHitPoint(IViewObjectEx *iface, DWORD aspect, const RECT *bounds, + POINT pt, LONG close_hint, DWORD *hit_result) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %s %s %d %p)\n", This, aspect, wine_dbgstr_rect(bounds), wine_dbgstr_point(&pt), close_hint, hit_result); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_QueryHitRect(IViewObjectEx *iface, DWORD aspect, const RECT *bounds, + const RECT *loc, LONG close_hint, DWORD *hit_result) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %s %s %d %p)\n", This, aspect, wine_dbgstr_rect(bounds), wine_dbgstr_rect(loc), close_hint, hit_result); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ViewObjectEx_GetNaturalExtent(IViewObjectEx *iface, DWORD aspect, LONG index, + DVTARGETDEVICE *device, HDC target_hdc, DVEXTENTINFO *extent_info, SIZEL *size) +{ + DHTMLEditImpl *This = impl_from_IViewObjectEx(iface); + + FIXME("(%p)->(%d %d %p %p %p %p)\n", This, aspect, index, device, target_hdc, extent_info, size); + + return E_NOTIMPL; +} + +static const IViewObjectExVtbl ViewObjectExVtbl = { + ViewObjectEx_QueryInterface, + ViewObjectEx_AddRef, + ViewObjectEx_Release, + ViewObjectEx_Draw, + ViewObjectEx_GetColorSet, + ViewObjectEx_Freeze, + ViewObjectEx_Unfreeze, + ViewObjectEx_SetAdvise, + ViewObjectEx_GetAdvise, + ViewObjectEx_GetExtent, + ViewObjectEx_GetRect, + ViewObjectEx_GetViewStatus, + ViewObjectEx_QueryHitPoint, + ViewObjectEx_QueryHitRect, + ViewObjectEx_GetNaturalExtent +}; + static HRESULT WINAPI OleInPlaceObjectWindowless_QueryInterface(IOleInPlaceObjectWindowless *iface, REFIID iid, LPVOID *out) { @@ -1148,6 +1313,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IProvideClassInfo2_iface.lpVtbl = &ProvideClassInfo2Vtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; + This->IViewObjectEx_iface.lpVtbl = &ViewObjectExVtbl; This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl; This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->client_site = NULL;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 96 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 7554aacbf8f..7a06588d46a 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -34,6 +34,7 @@ typedef struct IOleControl IOleControl_iface; IViewObjectEx IViewObjectEx_iface; IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; + IOleInPlaceActiveObject IOleInPlaceActiveObject_iface; IConnectionPointContainer IConnectionPointContainer_iface; IOleClientSite *client_site; SIZEL extent; @@ -75,6 +76,11 @@ static inline DHTMLEditImpl *impl_from_IOleInPlaceObjectWindowless(IOleInPlaceOb return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleInPlaceObjectWindowless_iface); }
+static inline DHTMLEditImpl *impl_from_IOleInPlaceActiveObject(IOleInPlaceActiveObject *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IOleInPlaceActiveObject_iface); +} + static inline DHTMLEditImpl *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) { return CONTAINING_RECORD(iface, DHTMLEditImpl, IConnectionPointContainer_iface); @@ -142,6 +148,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IOleInPlaceObjectWindowless_iface; return S_OK; } + else if(IsEqualGUID(iid, &IID_IOleInPlaceActiveObject)) + { + dhtml_edit_addref(This); + *out = &This->IOleInPlaceActiveObject_iface; + return S_OK; + } else if(IsEqualGUID(iid, &IID_IConnectionPointContainer)) { dhtml_edit_addref(This); @@ -1254,6 +1266,89 @@ static const IOleInPlaceObjectWindowlessVtbl OleInPlaceObjectWindowlessVtbl = { OleInPlaceObjectWindowless_GetDropTarget };
+static HRESULT WINAPI InPlaceActiveObject_QueryInterface(IOleInPlaceActiveObject *iface, + REFIID iid, LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IOleInPlaceActiveObject(iface), iid, out); +} + +static ULONG WINAPI InPlaceActiveObject_AddRef(IOleInPlaceActiveObject *iface) +{ + return dhtml_edit_addref(impl_from_IOleInPlaceActiveObject(iface)); +} + +static ULONG WINAPI InPlaceActiveObject_Release(IOleInPlaceActiveObject *iface) +{ + return dhtml_edit_release(impl_from_IOleInPlaceActiveObject(iface)); +} + +static HRESULT WINAPI InPlaceActiveObject_GetWindow(IOleInPlaceActiveObject *iface, + HWND *phwnd) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + return IOleInPlaceObjectWindowless_GetWindow(&This->IOleInPlaceObjectWindowless_iface, phwnd); +} + +static HRESULT WINAPI InPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceActiveObject *iface, + BOOL fEnterMode) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + return IOleInPlaceObjectWindowless_ContextSensitiveHelp(&This->IOleInPlaceObjectWindowless_iface, fEnterMode); +} + +static HRESULT WINAPI InPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, + LPMSG lpmsg) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + FIXME("(%p)->(%p)\n", This, lpmsg); + return E_NOTIMPL; +} + +static HRESULT WINAPI InPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface, + BOOL fActivate) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + FIXME("(%p)->(%x)\n", This, fActivate); + return E_NOTIMPL; +} + +static HRESULT WINAPI InPlaceActiveObject_OnDocWindowActivate(IOleInPlaceActiveObject *iface, + BOOL fActivate) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + FIXME("(%p)->(%x)\n", This, fActivate); + return E_NOTIMPL; +} + +static HRESULT WINAPI InPlaceActiveObject_ResizeBorder(IOleInPlaceActiveObject *iface, + LPCRECT lprcBorder, IOleInPlaceUIWindow *pUIWindow, BOOL fFrameWindow) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + FIXME("(%p)->(%p %p %x)\n", This, lprcBorder, pUIWindow, fFrameWindow); + return E_NOTIMPL; +} + +static HRESULT WINAPI InPlaceActiveObject_EnableModeless(IOleInPlaceActiveObject *iface, + BOOL fEnable) +{ + DHTMLEditImpl *This = impl_from_IOleInPlaceActiveObject(iface); + FIXME("(%p)->(%x)\n", This, fEnable); + return E_NOTIMPL; +} + +static const IOleInPlaceActiveObjectVtbl OleInPlaceActiveObjectVtbl = { + InPlaceActiveObject_QueryInterface, + InPlaceActiveObject_AddRef, + InPlaceActiveObject_Release, + InPlaceActiveObject_GetWindow, + InPlaceActiveObject_ContextSensitiveHelp, + InPlaceActiveObject_TranslateAccelerator, + InPlaceActiveObject_OnFrameWindowActivate, + InPlaceActiveObject_OnDocWindowActivate, + InPlaceActiveObject_ResizeBorder, + InPlaceActiveObject_EnableModeless +}; + static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID iid, LPVOID *out) { @@ -1315,6 +1410,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IOleControl_iface.lpVtbl = &OleControlVtbl; This->IViewObjectEx_iface.lpVtbl = &ViewObjectExVtbl; This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl; + This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl; This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->client_site = NULL; This->ref = 1;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 115 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 7a06588d46a..036b21e791e 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -36,6 +36,8 @@ typedef struct IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface; IOleInPlaceActiveObject IOleInPlaceActiveObject_iface; IConnectionPointContainer IConnectionPointContainer_iface; + IDataObject IDataObject_iface; + IOleClientSite *client_site; SIZEL extent; LONG ref; @@ -86,6 +88,11 @@ static inline DHTMLEditImpl *impl_from_IConnectionPointContainer(IConnectionPoin return CONTAINING_RECORD(iface, DHTMLEditImpl, IConnectionPointContainer_iface); }
+static inline DHTMLEditImpl *impl_from_IDataObject(IDataObject *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IDataObject_iface); +} + static ULONG dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -160,6 +167,13 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IConnectionPointContainer_iface; return S_OK; } + else if(IsEqualGUID(iid, &IID_IDataObject)) + { + dhtml_edit_addref(This); + *out = &This->IDataObject_iface; + return S_OK; + } +
*out = NULL; ERR("no interface for %s\n", debugstr_guid(iid)); @@ -1390,6 +1404,105 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = ConnectionPointContainer_FindConnectionPoint };
+static HRESULT WINAPI DataObject_QueryInterface(IDataObject *iface, REFIID iid, LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IDataObject(iface), iid, out); +} + +static ULONG WINAPI DataObject_AddRef(IDataObject *iface) +{ + return dhtml_edit_addref(impl_from_IDataObject(iface)); +} + +static ULONG WINAPI DataObject_Release(IDataObject *iface) +{ + return dhtml_edit_release(impl_from_IDataObject(iface)); +} + +static HRESULT WINAPI DataObject_GetData(IDataObject *iface, LPFORMATETC pformatetcIn, + STGMEDIUM *pmedium) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_GetDataHere(IDataObject *iface, LPFORMATETC pformatetc, + STGMEDIUM *pmedium) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_QueryGetData(IDataObject *iface, LPFORMATETC pformatetc) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_GetCanonicalFormatEtc(IDataObject *iface, + LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_SetData(IDataObject *iface, LPFORMATETC pformatetc, + STGMEDIUM *pmedium, BOOL fRelease) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_EnumFormatEtc(IDataObject *iface, DWORD dwDirection, + IEnumFORMATETC **ppenumFormatEtc) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_DAdvise(IDataObject *iface, FORMATETC *pformatetc, + DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_DUnadvise(IDataObject *iface, DWORD dwConnection) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI DataObject_EnumDAdvise(IDataObject *iface, IEnumSTATDATA **ppenumAdvise) +{ + DHTMLEditImpl *This = impl_from_IDataObject(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static const IDataObjectVtbl DataObjectVtbl = { + DataObject_QueryInterface, + DataObject_AddRef, + DataObject_Release, + DataObject_GetData, + DataObject_GetDataHere, + DataObject_QueryGetData, + DataObject_GetCanonicalFormatEtc, + DataObject_SetData, + DataObject_EnumFormatEtc, + DataObject_DAdvise, + DataObject_DUnadvise, + DataObject_EnumDAdvise +}; + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -1412,6 +1525,8 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IOleInPlaceObjectWindowless_iface.lpVtbl = &OleInPlaceObjectWindowlessVtbl; This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl; This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; + This->IDataObject_iface.lpVtbl = &DataObjectVtbl; + This->client_site = NULL; This->ref = 1;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 036b21e791e..e92e96f4050 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -37,6 +37,7 @@ typedef struct IOleInPlaceActiveObject IOleInPlaceActiveObject_iface; IConnectionPointContainer IConnectionPointContainer_iface; IDataObject IDataObject_iface; + IServiceProvider IServiceProvider_iface;
IOleClientSite *client_site; SIZEL extent; @@ -93,6 +94,11 @@ static inline DHTMLEditImpl *impl_from_IDataObject(IDataObject *iface) return CONTAINING_RECORD(iface, DHTMLEditImpl, IDataObject_iface); }
+static inline DHTMLEditImpl *impl_from_IServiceProvider(IServiceProvider *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IServiceProvider_iface); +} + static ULONG dhtml_edit_addref(DHTMLEditImpl *This) { LONG ref = InterlockedIncrement(&This->ref); @@ -173,6 +179,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IDataObject_iface; return S_OK; } + else if(IsEqualGUID(iid, &IID_IServiceProvider)) + { + dhtml_edit_addref(This); + *out = &This->IServiceProvider_iface; + return S_OK; + }
*out = NULL; @@ -1503,6 +1515,38 @@ static const IDataObjectVtbl DataObjectVtbl = { DataObject_EnumDAdvise };
+static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID iid, + LPVOID *out) +{ + return dhtml_edit_qi(impl_from_IServiceProvider(iface), iid, out); +} + +static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface) +{ + return dhtml_edit_addref(impl_from_IServiceProvider(iface)); +} + +static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface) +{ + return dhtml_edit_release(impl_from_IServiceProvider(iface)); +} + +static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, + REFIID riid, void **ppv) +{ + DHTMLEditImpl *This = impl_from_IServiceProvider(iface); + FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} + +static const IServiceProviderVtbl ServiceProviderVtbl = { + ServiceProvider_QueryInterface, + ServiceProvider_AddRef, + ServiceProvider_Release, + ServiceProvider_QueryService +}; + + HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This; @@ -1526,6 +1570,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IOleInPlaceActiveObject_iface.lpVtbl = &OleInPlaceActiveObjectVtbl; This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl; This->IDataObject_iface.lpVtbl = &DataObjectVtbl; + This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
This->client_site = NULL; This->ref = 1;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 83 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index e92e96f4050..b96630c73e5 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; IProvideClassInfo2 IProvideClassInfo2_iface; + IPersistStorage IPersistStorage_iface; IPersistStreamInit IPersistStreamInit_iface; IOleControl IOleControl_iface; IViewObjectEx IViewObjectEx_iface; @@ -59,6 +60,11 @@ static inline DHTMLEditImpl *impl_from_IProvideClassInfo2(IProvideClassInfo2 *if return CONTAINING_RECORD(iface, DHTMLEditImpl, IProvideClassInfo2_iface); }
+static inline DHTMLEditImpl *impl_from_IPersistStorage(IPersistStorage *iface) +{ + return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStorage_iface); +} + static inline DHTMLEditImpl *impl_from_IPersistStreamInit(IPersistStreamInit *iface) { return CONTAINING_RECORD(iface, DHTMLEditImpl, IPersistStreamInit_iface); @@ -133,6 +139,12 @@ static HRESULT dhtml_edit_qi(DHTMLEditImpl *This, REFIID iid, void **out) *out = &This->IProvideClassInfo2_iface; return S_OK; } + else if (IsEqualGUID(iid, &IID_IPersistStorage)) + { + dhtml_edit_addref(This); + *out = &This->IPersistStorage_iface; + return S_OK; + } else if (IsEqualGUID(iid, &IID_IPersistStreamInit)) { dhtml_edit_addref(This); @@ -928,6 +940,76 @@ static const IProvideClassInfo2Vtbl ProvideClassInfo2Vtbl = { ProvideClassInfo2_GetGUID };
+static HRESULT WINAPI PersistStorage_QueryInterface(IPersistStorage *iface, REFIID iid, void **out) +{ + return dhtml_edit_qi(impl_from_IPersistStorage(iface), iid, out); +} + +static ULONG WINAPI PersistStorage_AddRef(IPersistStorage *iface) +{ + return dhtml_edit_addref(impl_from_IPersistStorage(iface)); +} + +static ULONG WINAPI PersistStorage_Release(IPersistStorage *iface) +{ + return dhtml_edit_release(impl_from_IPersistStorage(iface)); +} + +static HRESULT WINAPI PersistStorage_GetClassID(IPersistStorage *iface, CLSID *clsid) +{ + DHTMLEditImpl *This = impl_from_IPersistStorage(iface); + FIXME("(%p)->(%p) stub\n", This, clsid); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStorage_IsDirty(IPersistStorage *iface) +{ + DHTMLEditImpl *This = impl_from_IPersistStorage(iface); + FIXME("(%p) stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStorage_InitNew(IPersistStorage *iface, LPSTORAGE storage) +{ + DHTMLEditImpl *This = impl_from_IPersistStorage(iface); + FIXME("(%p)->(%p) stub\n", This, storage); + return S_OK; +} + +static HRESULT WINAPI PersistStorage_Load(IPersistStorage *iface, LPSTORAGE storage) +{ + DHTMLEditImpl *This = impl_from_IPersistStorage(iface); + FIXME("(%p)->(%p) stub\n", This, storage); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStorage_Save(IPersistStorage *iface, LPSTORAGE storage, BOOL sameasld) +{ + DHTMLEditImpl *This = impl_from_IPersistStorage(iface); + FIXME("(%p)->(%p, %u) stub\n", This, storage, sameasld); + return E_NOTIMPL; +} + +static HRESULT WINAPI PersistStorage_SaveCompleted(IPersistStorage *iface, LPSTORAGE storage) +{ + DHTMLEditImpl *This = impl_from_IPersistStorage(iface); + FIXME("(%p)->(%p)\n", This, storage); + return E_NOTIMPL; +} + +static const IPersistStorageVtbl PersistStorageVtbl = +{ + PersistStorage_QueryInterface, + PersistStorage_AddRef, + PersistStorage_Release, + PersistStorage_GetClassID, + PersistStorage_IsDirty, + PersistStorage_InitNew, + PersistStorage_Load, + PersistStorage_Save, + PersistStorage_SaveCompleted +}; + static HRESULT WINAPI PersistStreamInit_QueryInterface(IPersistStreamInit *iface, REFIID iid, void **out) { return dhtml_edit_qi(impl_from_IPersistStreamInit(iface), iid, out); @@ -1563,6 +1645,7 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->IDHTMLEdit_iface.lpVtbl = &DHTMLEditVtbl; This->IOleObject_iface.lpVtbl = &OleObjectVtbl; This->IProvideClassInfo2_iface.lpVtbl = &ProvideClassInfo2Vtbl; + This->IPersistStorage_iface.lpVtbl = &PersistStorageVtbl; This->IPersistStreamInit_iface.lpVtbl = &PersistStreamInitVtbl; This->IOleControl_iface.lpVtbl = &OleControlVtbl; This->IViewObjectEx_iface.lpVtbl = &ViewObjectExVtbl;
Signed-off-by: Jacek Caban jacek@codeweavers.com
This makes RSSedit to work, no error dialog is shown.
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/Makefile.in | 2 +- dlls/dhtmled.ocx/dhtmled_private.h | 1 + dlls/dhtmled.ocx/edit.c | 110 ++++++++++++++++++++++++++--- dlls/dhtmled.ocx/main.c | 3 + 4 files changed, 106 insertions(+), 10 deletions(-)
diff --git a/dlls/dhtmled.ocx/Makefile.in b/dlls/dhtmled.ocx/Makefile.in index bbe397dc401..47d57f5b1f9 100644 --- a/dlls/dhtmled.ocx/Makefile.in +++ b/dlls/dhtmled.ocx/Makefile.in @@ -1,5 +1,5 @@ MODULE = dhtmled.ocx -IMPORTS = uuid ole32 user32 gdi32 +IMPORTS = uuid ole32 oleaut32 user32 gdi32
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dhtmled.ocx/dhtmled_private.h b/dlls/dhtmled.ocx/dhtmled_private.h index 5a9e89b9977..763f1f4fd1b 100644 --- a/dlls/dhtmled.ocx/dhtmled_private.h +++ b/dlls/dhtmled.ocx/dhtmled_private.h @@ -17,3 +17,4 @@ */
extern HRESULT dhtml_edit_create(REFIID iid, void **out); +void release_typelib(void); diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index b96630c73e5..fabd0ddf2a5 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -25,6 +25,78 @@
WINE_DEFAULT_DEBUG_CHANNEL(dhtmled);
+typedef enum tid_t { + NULL_tid, + IDHTMLEdit_tid, + LAST_tid +} tid_t; + +static ITypeLib *typelib; +static ITypeInfo *typeinfos[LAST_tid]; + +static REFIID tid_ids[] = { + &IID_NULL, + &IID_IDHTMLEdit +}; + +static HRESULT load_typelib(void) +{ + ITypeLib *tl; + HRESULT hr; + + hr = LoadRegTypeLib(&LIBID_DHTMLEDLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl); + if (FAILED(hr)) { + ERR("LoadRegTypeLib failed: %08x\n", hr); + return hr; + } + + if (InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) + ITypeLib_Release(tl); + return hr; +} + +void release_typelib(void) +{ + unsigned i; + + if (!typelib) + return; + + for (i = 0; i < ARRAY_SIZE(typeinfos); i++) + if (typeinfos[i]) + ITypeInfo_Release(typeinfos[i]); + + ITypeLib_Release(typelib); +} + +static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) +{ + HRESULT hr; + + if (!typelib) + hr = load_typelib(); + if (!typelib) + return hr; + + if (!typeinfos[tid]) + { + ITypeInfo *ti; + + hr = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti); + if (FAILED(hr)) + { + ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hr); + return hr; + } + + if (InterlockedCompareExchangePointer((void**)(typeinfos+tid), ti, NULL)) + ITypeInfo_Release(ti); + } + + *typeinfo = typeinfos[tid]; + return S_OK; +} + typedef struct { IDHTMLEdit IDHTMLEdit_iface; @@ -239,33 +311,53 @@ static ULONG WINAPI DHTMLEdit_Release(IDHTMLEdit *iface) static HRESULT WINAPI DHTMLEdit_GetTypeInfoCount(IDHTMLEdit *iface, UINT *count) { DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); - FIXME("(%p)->(%p) stub\n", This, count); - *count = 0; - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, count); + *count = 1; + return S_OK; }
static HRESULT WINAPI DHTMLEdit_GetTypeInfo(IDHTMLEdit *iface, UINT type_index, LCID lcid, ITypeInfo **type_info) { DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); - FIXME("(%p)->(%u, %08x, %p) stub\n", This, type_index, lcid, type_info); - return E_NOTIMPL; + HRESULT hr; + + TRACE("(%p)->(%u, %08x, %p)\n", This, type_index, lcid, type_info); + + hr = get_typeinfo(IDHTMLEdit_tid, type_info); + if (SUCCEEDED(hr)) + ITypeInfo_AddRef(*type_info); + return hr; }
static HRESULT WINAPI DHTMLEdit_GetIDsOfNames(IDHTMLEdit *iface, REFIID iid, OLECHAR **names, UINT name_count, LCID lcid, DISPID *disp_ids) { DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); - FIXME("(%p)->(%s, %p, %u, %08x, %p) stub\n", This, debugstr_guid(iid), names, name_count, lcid, disp_ids); - return E_NOTIMPL; + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p)->(%s, %p, %u, %08x, %p)\n", This, debugstr_guid(iid), names, name_count, lcid, disp_ids); + + hr = get_typeinfo(IDHTMLEdit_tid, &ti); + if (SUCCEEDED(hr)) + ITypeInfo_GetIDsOfNames(ti, names, name_count, disp_ids); + return hr; }
static HRESULT WINAPI DHTMLEdit_Invoke(IDHTMLEdit *iface, DISPID member, REFIID iid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *ret, EXCEPINFO *exception_info, UINT *error_index) { DHTMLEditImpl *This = impl_from_IDHTMLEdit(iface); - FIXME("(%p)->(%d, %s, %08x, 0x%x, %p, %p, %p, %p) stub\n", + ITypeInfo *ti; + HRESULT hr; + + TRACE("(%p)->(%d, %s, %08x, 0x%x, %p, %p, %p, %p)\n", This, member, debugstr_guid(iid), lcid, flags, params, ret, exception_info, error_index); - return E_NOTIMPL; + + hr = get_typeinfo(IDHTMLEdit_tid, &ti); + if (SUCCEEDED(hr)) + ITypeInfo_Invoke(ti, iface, member, flags, params, ret, exception_info, error_index); + return hr; }
static HRESULT WINAPI DHTMLEdit_ExecCommand(IDHTMLEdit *iface, DHTMLEDITCMDID cmd_id, OLECMDEXECOPT options, diff --git a/dlls/dhtmled.ocx/main.c b/dlls/dhtmled.ocx/main.c index b7409cf61a5..e4be35dd14b 100644 --- a/dlls/dhtmled.ocx/main.c +++ b/dlls/dhtmled.ocx/main.c @@ -107,6 +107,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, VOID *reserved) DisableThreadLibraryCalls(instance); dhtmled_instance = instance; break; + case DLL_PROCESS_DETACH: + release_typelib(); + break; }
return TRUE;
On 4/7/21 12:11 PM, Vijay Kiran Kamuju wrote:
- hr = get_typeinfo(IDHTMLEdit_tid, &ti);
- if (SUCCEEDED(hr))
ITypeInfo_GetIDsOfNames(ti, names, name_count, disp_ids);
The result should be propagated here. Same for Invoke().
Thanks, Jacek
On Wed, Apr 7, 2021 at 2:21 PM Jacek Caban jacek@codeweavers.com wrote:
On 4/7/21 12:11 PM, Vijay Kiran Kamuju wrote:
- hr = get_typeinfo(IDHTMLEdit_tid, &ti);
- if (SUCCEEDED(hr))
ITypeInfo_GetIDsOfNames(ti, names, name_count, disp_ids);
The result should be propagated here. Same for Invoke().
Fixed and sent a new version.
Thanks, Jacek
Thanks, Vijay
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 101 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 2 deletions(-)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index fabd0ddf2a5..41fef14f727 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -97,7 +97,17 @@ static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) return S_OK; }
-typedef struct +typedef struct DHTMLEditImpl DHTMLEditImpl; +typedef struct ConnectionPoint ConnectionPoint; + +struct ConnectionPoint +{ + IConnectionPoint IConnectionPoint_iface; + DHTMLEditImpl *dhed; + const IID *riid; +}; + +struct DHTMLEditImpl { IDHTMLEdit IDHTMLEdit_iface; IOleObject IOleObject_iface; @@ -113,9 +123,10 @@ typedef struct IServiceProvider IServiceProvider_iface;
IOleClientSite *client_site; + ConnectionPoint conpt; SIZEL extent; LONG ref; -} DHTMLEditImpl; +};
static inline DHTMLEditImpl *impl_from_IDHTMLEdit(IDHTMLEdit *iface) { @@ -1590,6 +1601,88 @@ static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = ConnectionPointContainer_FindConnectionPoint };
+static inline ConnectionPoint *impl_from_IConnectionPoint(IConnectionPoint *iface) +{ + return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface); +} + +static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, REFIID iid, LPVOID *out) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + + if (IsEqualGUID(&IID_IUnknown, iid) || IsEqualGUID(&IID_IConnectionPoint, iid)) + { + *out = &This->IConnectionPoint_iface; + DHTMLEdit_AddRef(&This->dhed->IDHTMLEdit_iface); + return S_OK; + } + + *out = NULL; + WARN("Unsupported interface %s\n", debugstr_guid(iid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + return IConnectionPointContainer_AddRef(&This->dhed->IConnectionPointContainer_iface); +} + +static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + return IConnectionPointContainer_AddRef(&This->dhed->IConnectionPointContainer_iface); +} + +static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *iid) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + FIXME("%p, %p\n", This, iid); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface, + IConnectionPointContainer **container) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + FIXME("%p, %p\n", This, container); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *unk_sink, + DWORD *cookie) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + FIXME("%p, %p, %p\n", This, unk_sink, cookie); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD cookie) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + FIXME("%p, %d\n", This, cookie); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface, + IEnumConnections **points) +{ + ConnectionPoint *This = impl_from_IConnectionPoint(iface); + FIXME("%p, %p\n", This, points); + return E_NOTIMPL; +} + +static const IConnectionPointVtbl ConnectionPointVtbl = { + ConnectionPoint_QueryInterface, + ConnectionPoint_AddRef, + ConnectionPoint_Release, + ConnectionPoint_GetConnectionInterface, + ConnectionPoint_GetConnectionPointContainer, + ConnectionPoint_Advise, + ConnectionPoint_Unadvise, + ConnectionPoint_EnumConnections +}; + static HRESULT WINAPI DataObject_QueryInterface(IDataObject *iface, REFIID iid, LPVOID *out) { return dhtml_edit_qi(impl_from_IDataObject(iface), iid, out); @@ -1750,6 +1843,10 @@ HRESULT dhtml_edit_create(REFIID iid, void **out) This->client_site = NULL; This->ref = 1;
+ This->conpt.dhed = This; + This->conpt.riid = &DIID__DHTMLEditEvents; + This->conpt.IConnectionPoint_iface.lpVtbl = &ConnectionPointVtbl; + hdc = GetDC(0); dpi_x = GetDeviceCaps(hdc, LOGPIXELSX); dpi_y = GetDeviceCaps(hdc, LOGPIXELSY);
Signed-off-by: Vijay Kiran Kamuju infyquest@gmail.com --- dlls/dhtmled.ocx/edit.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/dhtmled.ocx/edit.c b/dlls/dhtmled.ocx/edit.c index 41fef14f727..f5a587539e5 100644 --- a/dlls/dhtmled.ocx/edit.c +++ b/dlls/dhtmled.ocx/edit.c @@ -1585,10 +1585,23 @@ static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionP }
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, - REFIID riid, IConnectionPoint **ppCP) + REFIID riid, IConnectionPoint **point) { DHTMLEditImpl *This = impl_from_IConnectionPointContainer(iface); - FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppCP); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), point); + + if (!point) + return E_POINTER; + + if (IsEqualGUID(riid, This->conpt.riid)) + { + *point = &This->conpt.IConnectionPoint_iface; + IConnectionPoint_AddRef(*point); + return S_OK; + } + + FIXME("unsupported connection point %s\n", debugstr_guid(riid)); return CONNECT_E_NOCONNECTION; }
@@ -1813,7 +1826,6 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { ServiceProvider_QueryService };
- HRESULT dhtml_edit_create(REFIID iid, void **out) { DHTMLEditImpl *This;