Jacek Caban : mshtml: Added IOleContainer stub implementation.

Alexandre Julliard julliard at winehq.org
Wed Dec 15 11:29:56 CST 2010


Module: wine
Branch: master
Commit: dc25bca4edb303f7f903f51773871709e1c704e8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dc25bca4edb303f7f903f51773871709e1c704e8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Dec 15 00:42:32 2010 +0100

mshtml: Added IOleContainer stub implementation.

---

 dlls/mshtml/htmldoc.c        |    3 ++
 dlls/mshtml/mshtml_private.h |    1 +
 dlls/mshtml/oleobj.c         |   55 ++++++++++++++++++++++++++++++++++++++++++
 dlls/mshtml/tests/dom.c      |    3 ++
 4 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 7cfa273..3c4b03c 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -1818,6 +1818,9 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
     }else if(IsEqualGUID(&IID_IObjectWithSite, riid)) {
         TRACE("(%p)->(IID_IObjectWithSite %p)\n", This, ppv);
         *ppv = OBJSITE(This);
+    }else if(IsEqualGUID(&IID_IOleContainer, riid)) {
+        TRACE("(%p)->(IID_IOleContainer %p)\n", This, ppv);
+        *ppv = &This->IOleContainer_iface;
     }else {
         return FALSE;
     }
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 269962f..833caf0 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -365,6 +365,7 @@ struct HTMLDocument {
     const IDispatchExVtbl                 *lpIDispatchExVtbl;
     const ISupportErrorInfoVtbl           *lpSupportErrorInfoVtbl;
     const IObjectWithSiteVtbl             *lpObjectWithSiteVtbl;
+    IOleContainer    IOleContainer_iface;
 
     IUnknown *unk_impl;
     IDispatchEx *dispex;
diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c
index 419d9aa..173a6cf 100644
--- a/dlls/mshtml/oleobj.c
+++ b/dlls/mshtml/oleobj.c
@@ -797,6 +797,60 @@ static const IObjectWithSiteVtbl ObjectWithSiteVtbl = {
     ObjectWithSite_GetSite
 };
 
+static inline HTMLDocument *impl_from_IOleContainer(IOleContainer *iface)
+{
+    return CONTAINING_RECORD(iface, HTMLDocument, IOleContainer_iface);
+}
+
+static HRESULT WINAPI OleContainer_QueryInterface(IOleContainer *iface, REFIID riid, void **ppv)
+{
+    HTMLDocument *This = impl_from_IOleContainer(iface);
+    return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
+}
+
+static ULONG WINAPI OleContainer_AddRef(IOleContainer *iface)
+{
+    HTMLDocument *This = impl_from_IOleContainer(iface);
+    return IHTMLDocument2_AddRef(HTMLDOC(This));
+}
+
+static ULONG WINAPI OleContainer_Release(IOleContainer *iface)
+{
+    HTMLDocument *This = impl_from_IOleContainer(iface);
+    return IHTMLDocument2_Release(HTMLDOC(This));
+}
+
+static HRESULT WINAPI OleContainer_ParseDisplayName(IOleContainer *iface, IBindCtx *pbc, LPOLESTR pszDisplayName,
+        ULONG *pchEaten, IMoniker **ppmkOut)
+{
+    HTMLDocument *This = impl_from_IOleContainer(iface);
+    FIXME("(%p)->(%p %s %p %p)\n", This, pbc, debugstr_w(pszDisplayName), pchEaten, ppmkOut);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleContainer_EnumObjects(IOleContainer *iface, DWORD grfFlags, IEnumUnknown **ppenum)
+{
+    HTMLDocument *This = impl_from_IOleContainer(iface);
+    FIXME("(%p)->(%x %p)\n", This, grfFlags, ppenum);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI OleContainer_LockContainer(IOleContainer *iface, BOOL fLock)
+{
+    HTMLDocument *This = impl_from_IOleContainer(iface);
+    FIXME("(%p)->(%x)\n", This, fLock);
+    return E_NOTIMPL;
+}
+
+static const IOleContainerVtbl OleContainerVtbl = {
+    OleContainer_QueryInterface,
+    OleContainer_AddRef,
+    OleContainer_Release,
+    OleContainer_ParseDisplayName,
+    OleContainer_EnumObjects,
+    OleContainer_LockContainer
+};
+
 void HTMLDocument_LockContainer(HTMLDocumentObj *This, BOOL fLock)
 {
     IOleContainer *container;
@@ -819,4 +873,5 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
     This->lpOleDocumentVtbl = &OleDocumentVtbl;
     This->lpOleControlVtbl = &OleControlVtbl;
     This->lpObjectWithSiteVtbl = &ObjectWithSiteVtbl;
+    This->IOleContainer_iface.lpVtbl = &OleContainerVtbl;
 }
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index e3b932c..19b7d14 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -125,6 +125,7 @@ static const IID * const doc_node_iids[] = {
     &IID_IDispatchEx,
     &IID_IConnectionPointContainer,
     &IID_IInternetHostSecurityManager,
+    &IID_IOleContainer,
     NULL
 };
 
@@ -137,6 +138,7 @@ static const IID * const doc_obj_iids[] = {
     &IID_IDispatchEx,
     &IID_IConnectionPointContainer,
     &IID_ICustomDoc,
+    &IID_IOleContainer,
     NULL
 };
 
@@ -267,6 +269,7 @@ static const IID * const window_iids[] = {
     &IID_IHTMLWindow2,
     &IID_IHTMLWindow3,
     &IID_IDispatchEx,
+    &IID_IServiceProvider,
     NULL
 };
 




More information about the wine-cvs mailing list