From 5650d2b8f154337c6c958cde9423f90df98ec6b7 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 26 Feb 2021 19:02:24 +1100 Subject: [PATCH] msado15: Implement Dispatch functions in Field. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/msado15/main.c | 1 + dlls/msado15/msado15_private.h | 1 + dlls/msado15/recordset.c | 44 ++++++++++++++++++++++++++++++++++-------- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c index 4d54999fb04..2541c81b1d2 100644 --- a/dlls/msado15/main.c +++ b/dlls/msado15/main.c @@ -181,6 +181,7 @@ static ITypeInfo *typeinfos[LAST_tid]; static REFIID tid_ids[] = { &IID__Command, &IID__Connection, + &IID_Field, &IID__Stream, }; diff --git a/dlls/msado15/msado15_private.h b/dlls/msado15/msado15_private.h index b9fa01ef90d..9db82c8bd9a 100644 --- a/dlls/msado15/msado15_private.h +++ b/dlls/msado15/msado15_private.h @@ -45,6 +45,7 @@ static inline WCHAR *strdupW( const WCHAR *src ) typedef enum tid_t { Command_tid, Connection_tid, + Field_tid, Stream_tid, LAST_tid } tid_t; diff --git a/dlls/msado15/recordset.c b/dlls/msado15/recordset.c index 71df553ebb6..b79fca16705 100644 --- a/dlls/msado15/recordset.c +++ b/dlls/msado15/recordset.c @@ -126,29 +126,57 @@ static HRESULT WINAPI field_QueryInterface( Field *iface, REFIID riid, void **ob static HRESULT WINAPI field_GetTypeInfoCount( Field *iface, UINT *count ) { - FIXME( "%p, %p\n", iface, count ); - return E_NOTIMPL; + struct field *field = impl_from_Field( iface ); + TRACE( "%p, %p\n", field, count ); + *count = 1; + return S_OK; } static HRESULT WINAPI field_GetTypeInfo( Field *iface, UINT index, LCID lcid, ITypeInfo **info ) { - FIXME( "%p, %u, %u, %p\n", iface, index, lcid, info ); - return E_NOTIMPL; + struct field *field = impl_from_Field( iface ); + TRACE( "%p, %u, %u, %p\n", field, index, lcid, info ); + return get_typeinfo(Field_tid, info); } static HRESULT WINAPI field_GetIDsOfNames( Field *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *dispid ) { - FIXME( "%p, %s, %p, %u, %u, %p\n", iface, debugstr_guid(riid), names, count, lcid, dispid ); - return E_NOTIMPL; + struct field *field = impl_from_Field( iface ); + HRESULT hr; + ITypeInfo *typeinfo; + + TRACE( "%p, %s, %p, %u, %u, %p\n", field, debugstr_guid(riid), names, count, lcid, dispid ); + + hr = get_typeinfo(Field_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, names, count, dispid); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI field_Invoke( Field *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep_info, UINT *arg_err ) { - FIXME( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", iface, member, debugstr_guid(riid), lcid, flags, params, + struct field *field = impl_from_Field( iface ); + HRESULT hr; + ITypeInfo *typeinfo; + + TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", field, member, debugstr_guid(riid), lcid, flags, params, result, excep_info, arg_err ); - return E_NOTIMPL; + + hr = get_typeinfo(Field_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke(typeinfo, &field->Field_iface, member, flags, params, + result, excep_info, arg_err); + ITypeInfo_Release(typeinfo); + } + + return hr; } static HRESULT WINAPI field_get_Properties( Field *iface, Properties **obj ) -- 2.11.4.GIT