Commit 71bd7fdf authored by Ludger Sprenker's avatar Ludger Sprenker Committed by Alexandre Julliard

windowscodecs: Implement IPropertyBag2::CountProperties.

parent d4b1db71
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment