From: Vibhav Pant vibhavp@gmail.com
--- dlls/wintypes/propertyset.c | 39 +++++++++++++++++++++++++++++++ dlls/wintypes/tests/propertyset.c | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/dlls/wintypes/propertyset.c b/dlls/wintypes/propertyset.c index ec846279286..1fefb3f38fb 100644 --- a/dlls/wintypes/propertyset.c +++ b/dlls/wintypes/propertyset.c @@ -31,6 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL( wintypes ); struct mapview_HSTRING_IInspectable { IMapView_HSTRING_IInspectable IMapView_HSTRING_IInspectable_iface; + IIterable_IKeyValuePair_HSTRING_IInspectable IIterable_IKeyValuePair_HSTRING_IInspectable_iface; LONG ref; };
@@ -55,6 +56,14 @@ static HRESULT STDMETHODCALLTYPE mapview_HSTRING_IInspectable_QueryInterface( IUnknown_AddRef( iface ); return S_OK; } + if (IsEqualGUID( iid, &IID_IIterable_IKeyValuePair_HSTRING_IInspectable )) + { + struct mapview_HSTRING_IInspectable *impl = + impl_from_IMapView_HSTRING_IInspectable( iface ); + *out = &impl->IIterable_IKeyValuePair_HSTRING_IInspectable_iface; + IUnknown_AddRef( iface ); + return S_OK; + }
FIXME( "%s not implemented, returning E_NOTINTERFACE.\n", debugstr_guid( iid ) ); return E_NOINTERFACE; @@ -154,6 +163,36 @@ const static IMapView_HSTRING_IInspectableVtbl mapview_HSTRING_IInspectable_vtbl mapview_HSTRING_IInspectable_Split, };
+DEFINE_IINSPECTABLE_( mapview_iterable_kvpair_HSTRING_IInspectable, + IIterable_IKeyValuePair_HSTRING_IInspectable, + struct mapview_HSTRING_IInspectable, + mapview_impl_from_IIterable_IKeyValuePair_HSTRING_IInspectable, + IIterable_IKeyValuePair_HSTRING_IInspectable_iface, + &impl->IMapView_HSTRING_IInspectable_iface ); + +static HRESULT STDMETHODCALLTYPE mapview_iterable_kvpair_HSTRING_IInspectable_First( + IIterable_IKeyValuePair_HSTRING_IInspectable *iface, + IIterator_IKeyValuePair_HSTRING_IInspectable **iter ) +{ + FIXME( "(%p, %p) stub!\n", iface, iter ); + return E_NOTIMPL; +} + +const static IIterable_IKeyValuePair_HSTRING_IInspectableVtbl + mapview_iterable_kvpair_HSTRING_IInspectable_vtbl = +{ + /* IUnknown */ + mapview_iterable_kvpair_HSTRING_IInspectable_QueryInterface, + mapview_iterable_kvpair_HSTRING_IInspectable_AddRef, + mapview_iterable_kvpair_HSTRING_IInspectable_Release, + /* IInspectable */ + mapview_iterable_kvpair_HSTRING_IInspectable_GetIids, + mapview_iterable_kvpair_HSTRING_IInspectable_GetRuntimeClassName, + mapview_iterable_kvpair_HSTRING_IInspectable_GetTrustLevel, + /* IIterable<IKeyValuePair<HSTRING, IInspectable*>> */ + mapview_iterable_kvpair_HSTRING_IInspectable_First +}; + struct propertyset { IPropertySet IPropertySet_iface; diff --git a/dlls/wintypes/tests/propertyset.c b/dlls/wintypes/tests/propertyset.c index 9623ba09c11..a7a38d8ca4c 100644 --- a/dlls/wintypes/tests/propertyset.c +++ b/dlls/wintypes/tests/propertyset.c @@ -109,7 +109,7 @@ static void test_IPropertySet(void) { hr = IMapView_HSTRING_IInspectable_QueryInterface( map_view, &IID_IIterable_IKeyValuePair_HSTRING_IInspectable, (void **)&iterable ); - todo_wine ok( SUCCEEDED( hr ), "QueryInterface failed, got %#lx\n", hr ); + ok( SUCCEEDED( hr ), "QueryInterface failed, got %#lx\n", hr ); if (SUCCEEDED( hr )) { hr = IIterable_IKeyValuePair_HSTRING_IInspectable_First( iterable, &iterator );