Ludger Sprenker : windowscodecs: Implement IPropertyBag2::CountProperties.
Alexandre Julliard
julliard at winehq.org
Wed Jan 30 13:43:22 CST 2013
Module: wine
Branch: master
Commit: 71bd7fdf7745c2524e221c99be155df587a270a5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=71bd7fdf7745c2524e221c99be155df587a270a5
Author: Ludger Sprenker <Ludger at sprenker.net>
Date: Wed Jan 23 23:35:19 2013 +0100
windowscodecs: Implement IPropertyBag2::CountProperties.
---
dlls/windowscodecs/propertybag.c | 14 ++++++++++++--
dlls/windowscodecs/tests/propertybag.c | 2 --
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c
index 1c90b15..f95e7eb 100644
--- a/dlls/windowscodecs/propertybag.c
+++ b/dlls/windowscodecs/propertybag.c
@@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef struct PropertyBag {
IPropertyBag2 IPropertyBag2_iface;
LONG ref;
+ UINT prop_count;
} PropertyBag;
static inline PropertyBag *impl_from_IPropertyBag2(IPropertyBag2 *iface)
@@ -108,8 +109,16 @@ static HRESULT WINAPI PropertyBag_Write(IPropertyBag2 *iface, ULONG cProperties,
static HRESULT WINAPI PropertyBag_CountProperties(IPropertyBag2 *iface, ULONG *pcProperties)
{
- FIXME("(%p,%p): stub\n", iface, pcProperties);
- return E_NOTIMPL;
+ PropertyBag *This = impl_from_IPropertyBag2(iface);
+
+ TRACE("(%p,%p)\n", iface, pcProperties);
+
+ if (!pcProperties)
+ return E_INVALIDARG;
+
+ *pcProperties = This->prop_count;
+
+ return S_OK;
}
static HRESULT WINAPI PropertyBag_GetPropertyInfo(IPropertyBag2 *iface, ULONG iProperty,
@@ -147,6 +156,7 @@ HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count,
This->IPropertyBag2_iface.lpVtbl = &PropertyBag_Vtbl;
This->ref = 1;
+ This->prop_count = count;
*ppPropertyBag2 = &This->IPropertyBag2_iface;
diff --git a/dlls/windowscodecs/tests/propertybag.c b/dlls/windowscodecs/tests/propertybag.c
index d5ac809..83141a2 100644
--- a/dlls/windowscodecs/tests/propertybag.c
+++ b/dlls/windowscodecs/tests/propertybag.c
@@ -237,7 +237,6 @@ static void test_empty_propertybag(void)
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr);
if (FAILED(hr)) return;
-todo_wine
test_propertybag_countproperties(property, 0);
todo_wine
@@ -267,7 +266,6 @@ static void test_filled_propertybag(void)
ok(hr == S_OK, "Creating EncoderPropertyBag failed, hr=%x\n", hr);
if (FAILED(hr)) return;
-todo_wine
test_propertybag_countproperties(property, 2);
todo_wine
More information about the wine-cvs
mailing list