Jacek Caban : mshtml: Added IPropertyBag2 stub implementation.

Alexandre Julliard julliard at winehq.org
Fri Dec 10 11:57:02 CST 2010


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Dec 10 16:36:13 2010 +0100

mshtml: Added IPropertyBag2 stub implementation.

---

 dlls/mshtml/propbag.c       |   77 +++++++++++++++++++++++++++++++++++++++++++
 dlls/mshtml/tests/activex.c |    8 ++++
 2 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/propbag.c b/dlls/mshtml/propbag.c
index fd44f03..f52396c 100644
--- a/dlls/mshtml/propbag.c
+++ b/dlls/mshtml/propbag.c
@@ -38,6 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
 
 typedef struct {
     IPropertyBag  IPropertyBag_iface;
+    IPropertyBag2 IPropertyBag2_iface;
 
     LONG ref;
 } PropertyBag;
@@ -57,6 +58,9 @@ static HRESULT WINAPI PropertyBag_QueryInterface(IPropertyBag *iface, REFIID rii
     }else if(IsEqualGUID(&IID_IPropertyBag, riid)) {
         TRACE("(%p)->(IID_IPropertyBag %p)\n", This, ppv);
         *ppv = &This->IPropertyBag_iface;
+    }else if(IsEqualGUID(&IID_IPropertyBag2, riid)) {
+        TRACE("(%p)->(IID_IPropertyBag2 %p)\n", This, ppv);
+        *ppv = &This->IPropertyBag2_iface;
     }else {
         WARN("Unsopported interface %s\n", debugstr_guid(riid));
         *ppv = NULL;
@@ -112,6 +116,78 @@ static const IPropertyBagVtbl PropertyBagVtbl = {
     PropertyBag_Write
 };
 
+static inline PropertyBag *impl_from_IPropertyBag2(IPropertyBag2 *iface)
+{
+    return CONTAINING_RECORD(iface, PropertyBag, IPropertyBag2_iface);
+}
+
+static HRESULT WINAPI PropertyBag2_QueryInterface(IPropertyBag2 *iface, REFIID riid, void **ppv)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    return IPropertyBag_QueryInterface(&This->IPropertyBag_iface, riid, ppv);
+}
+
+static ULONG WINAPI PropertyBag2_AddRef(IPropertyBag2 *iface)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    return IPropertyBag_AddRef(&This->IPropertyBag_iface);
+}
+
+static ULONG WINAPI PropertyBag2_Release(IPropertyBag2 *iface)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    return IPropertyBag_Release(&This->IPropertyBag_iface);
+}
+
+static HRESULT WINAPI PropertyBag2_Read(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag,
+        IErrorLog *pErrLog, VARIANT *pvarValue, HRESULT *phrError)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    FIXME("(%p)->(%d %p %p %p %p)\n", This, cProperties, pPropBag, pErrLog, pvarValue, phrError);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI PropertyBag2_Write(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, VARIANT *pvarValue)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    FIXME("(%p)->(%d %p %s)\n", This, cProperties, pPropBag, debugstr_variant(pvarValue));
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI PropertyBag2_CountProperties(IPropertyBag2 *iface, ULONG *pcProperties)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    FIXME("(%p)->(%p)\n", This, pcProperties);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI PropertyBag2_GetPropertyInfo(IPropertyBag2 *iface, ULONG iProperty, ULONG cProperties,
+        PROPBAG2 *pPropBag, ULONG *pcProperties)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    FIXME("(%p)->(%u %u %p %p)\n", This, iProperty, cProperties, pPropBag, pcProperties);
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI PropertyBag2_LoadObject(IPropertyBag2 *iface, LPCOLESTR pstrName, DWORD dwHint,
+        IUnknown *pUnkObject, IErrorLog *pErrLog)
+{
+    PropertyBag *This = impl_from_IPropertyBag2(iface);
+    FIXME("(%p)->(%s %x %p %p)\n", This, debugstr_w(pstrName), dwHint, pUnkObject, pErrLog);
+    return E_NOTIMPL;
+}
+
+static const IPropertyBag2Vtbl PropertyBag2Vtbl = {
+    PropertyBag2_QueryInterface,
+    PropertyBag2_AddRef,
+    PropertyBag2_Release,
+    PropertyBag2_Read,
+    PropertyBag2_Write,
+    PropertyBag2_CountProperties,
+    PropertyBag2_GetPropertyInfo,
+    PropertyBag2_LoadObject
+};
+
 HRESULT create_param_prop_bag(IPropertyBag **ret)
 {
     PropertyBag *prop_bag;
@@ -121,6 +197,7 @@ HRESULT create_param_prop_bag(IPropertyBag **ret)
         return E_OUTOFMEMORY;
 
     prop_bag->IPropertyBag_iface.lpVtbl  = &PropertyBagVtbl;
+    prop_bag->IPropertyBag2_iface.lpVtbl = &PropertyBag2Vtbl;
     prop_bag->ref = 1;
 
     *ret = &prop_bag->IPropertyBag_iface;
diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c
index 8e46a25..ee921c5 100644
--- a/dlls/mshtml/tests/activex.c
+++ b/dlls/mshtml/tests/activex.c
@@ -299,11 +299,19 @@ static HRESULT WINAPI PersistPropertyBag_InitNew(IPersistPropertyBag *face)
 
 static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 {
+    static const IID *propbag_ifaces[] = {
+        &IID_IPropertyBag,
+        &IID_IPropertyBag2,
+        NULL
+    };
+
     CHECK_EXPECT(IPersistPropertyBag_Load);
 
     ok(pPropBag != NULL, "pPropBag == NULL\n");
     ok(!pErrorLog, "pErrorLog != NULL\n");
 
+    test_ifaces((IUnknown*)pPropBag, propbag_ifaces);
+
     return S_OK;
 }
 




More information about the wine-cvs mailing list