wintypes: Add stubs for IIterator<IKeyValuePair<HSTRING, IInspectable *>>.

This commit is contained in:
Vibhav Pant 2024-11-03 18:36:38 +05:30
parent e385002e30
commit 35e1a70897
No known key found for this signature in database
GPG key ID: E3FB28CB6AB59598

View file

@ -28,6 +28,151 @@
WINE_DEFAULT_DEBUG_CHANNEL( wintypes );
struct iterator_kvpair_HSTRING_IInspectable
{
IIterator_IKeyValuePair_HSTRING_IInspectable IIterator_IKeyValuePair_HSTRING_IInspectable_iface;
LONG ref;
};
static inline struct iterator_kvpair_HSTRING_IInspectable *
impl_from_IIterator_IKeyValuePair_HSTRING_IInspectable(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface )
{
return CONTAINING_RECORD( iface, struct iterator_kvpair_HSTRING_IInspectable,
IIterator_IKeyValuePair_HSTRING_IInspectable_iface );
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_QueryInterface(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, REFIID iid, void **out )
{
TRACE( "(%p, %s, %p)\n", iface, debugstr_guid( iid ), out );
*out = NULL;
if (IsEqualGUID( iid, &IID_IUnknown ) ||
IsEqualGUID( iid, &IID_IInspectable ) ||
IsEqualGUID( iid, &IID_IIterator_IKeyValuePair_HSTRING_IInspectable ))
{
*out = iface;
IUnknown_AddRef( (IUnknown *)*out );
return S_OK;
}
FIXME( "%s not implemented, returning E_NOINTERFACE.", debugstr_guid( iid ) );
return E_NOINTERFACE;
}
static ULONG STDMETHODCALLTYPE
iterator_kvpair_HSTRING_IInspectable_AddRef( IIterator_IKeyValuePair_HSTRING_IInspectable *iface )
{
struct iterator_kvpair_HSTRING_IInspectable *impl;
TRACE( "(%p)\n", iface );
impl = impl_from_IIterator_IKeyValuePair_HSTRING_IInspectable( iface );
return InterlockedIncrement( &impl->ref );
}
static ULONG STDMETHODCALLTYPE
iterator_kvpair_HSTRING_IInspectable_Release( IIterator_IKeyValuePair_HSTRING_IInspectable *iface )
{
struct iterator_kvpair_HSTRING_IInspectable *impl;
ULONG ref;
TRACE( "(%p)\n", iface );
impl = impl_from_IIterator_IKeyValuePair_HSTRING_IInspectable( iface );
ref = InterlockedDecrement( &impl->ref );
if (!ref)
free( impl );
return ref;
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_GetIids(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, ULONG *iid_count, IID **iids )
{
FIXME( "(%p, %p, %p) stub!\n", iface, iid_count, iids );
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_GetRuntimeClassName(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, HSTRING *class_name )
{
FIXME( "(%p, %p) stub!\n", iface, class_name );
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_GetTrustLevel(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, TrustLevel *trust_level )
{
FIXME( "(%p, %p) stub!\n", iface, trust_level );
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE
iterator_kvpair_HSTRING_IInspectable_get_Current( IIterator_IKeyValuePair_HSTRING_IInspectable *iface,
IKeyValuePair_HSTRING_IInspectable **kvpair )
{
FIXME( "(%p, %p) stub!\n", iface, kvpair );
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_HasCurrent(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, boolean *exists )
{
FIXME( "(%p, %p) stub!\n", iface, exists );
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_MoveNext(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, boolean *valid )
{
FIXME( "(%p, %p) stub!\n", iface, valid );
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE iterator_kvpair_HSTRING_IInspectable_GetMany(
IIterator_IKeyValuePair_HSTRING_IInspectable *iface, UINT32 count,
IKeyValuePair_HSTRING_IInspectable **items, UINT32 *value )
{
FIXME( "(%p, %u, %p, %p) stub!\n", iface, count, items, value );
return E_NOTIMPL;
}
const static IIterator_IKeyValuePair_HSTRING_IInspectableVtbl iterator_kvpair_HSTRING_IInspectable_vtbl =
{
/* IUnknown */
iterator_kvpair_HSTRING_IInspectable_QueryInterface,
iterator_kvpair_HSTRING_IInspectable_AddRef,
iterator_kvpair_HSTRING_IInspectable_Release,
/* IInspectable */
iterator_kvpair_HSTRING_IInspectable_GetIids,
iterator_kvpair_HSTRING_IInspectable_GetRuntimeClassName,
iterator_kvpair_HSTRING_IInspectable_GetTrustLevel,
/* IIterator<IKeyValuePair<HSTRING,IInspectable*>> */
iterator_kvpair_HSTRING_IInspectable_get_Current,
iterator_kvpair_HSTRING_IInspectable_HasCurrent,
iterator_kvpair_HSTRING_IInspectable_MoveNext,
iterator_kvpair_HSTRING_IInspectable_GetMany,
};
static HRESULT
iterator_kvpair_HSTRING_IInspectable_create( IIterator_IKeyValuePair_HSTRING_IInspectable **iface )
{
struct iterator_kvpair_HSTRING_IInspectable *impl_iter;
TRACE( "(%p)\n", iface );
impl_iter = calloc( 1, sizeof( *impl_iter ) );
if (!impl_iter)
return E_OUTOFMEMORY;
impl_iter->IIterator_IKeyValuePair_HSTRING_IInspectable_iface.lpVtbl = &iterator_kvpair_HSTRING_IInspectable_vtbl;
impl_iter->ref = 1;
*iface = &impl_iter->IIterator_IKeyValuePair_HSTRING_IInspectable_iface;
return S_OK;
}
struct mapview_HSTRING_IInspectable
{
IMapView_HSTRING_IInspectable IMapView_HSTRING_IInspectable_iface;
@ -174,8 +319,8 @@ static HRESULT STDMETHODCALLTYPE mapview_iterable_kvpair_HSTRING_IInspectable_Fi
IIterable_IKeyValuePair_HSTRING_IInspectable *iface,
IIterator_IKeyValuePair_HSTRING_IInspectable **iter )
{
FIXME( "(%p, %p) stub!\n", iface, iter );
return E_NOTIMPL;
FIXME( "(%p, %p) semi-stub!\n", iface, iter );
return iterator_kvpair_HSTRING_IInspectable_create( iter );
}
const static IIterable_IKeyValuePair_HSTRING_IInspectableVtbl
@ -435,8 +580,8 @@ static HRESULT STDMETHODCALLTYPE
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;
FIXME( "(%p, %p) semi-stub!\n", iface, iter );
return iterator_kvpair_HSTRING_IInspectable_create( iter );
}
const static IIterable_IKeyValuePair_HSTRING_IInspectableVtbl iterable_kvpair_HSTRING_IInspectable_vtbl =