Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/msado15/command.c | 44 +++++++++++++++++++++++++++------- dlls/msado15/main.c | 1 + dlls/msado15/msado15_private.h | 1 + 3 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/dlls/msado15/command.c b/dlls/msado15/command.c index 9a56ced25ac..aff12f6a108 100644 --- a/dlls/msado15/command.c +++ b/dlls/msado15/command.c @@ -91,29 +91,57 @@ static ULONG WINAPI command_Release( _Command *iface )
static HRESULT WINAPI command_GetTypeInfoCount( _Command *iface, UINT *count ) { - FIXME( "%p, %p\n", iface, count ); - return E_NOTIMPL; + struct command *command = impl_from_Command( iface ); + TRACE( "%p, %p\n", command, count ); + *count = 1; + return S_OK; }
static HRESULT WINAPI command_GetTypeInfo( _Command *iface, UINT index, LCID lcid, ITypeInfo **info ) { - FIXME( "%p, %u, %u, %p\n", iface, index, lcid, info ); - return E_NOTIMPL; + struct command *command = impl_from_Command( iface ); + TRACE( "%p, %u, %u, %p\n", command, index, lcid, info ); + return get_typeinfo(Command_tid, info); }
static HRESULT WINAPI command_GetIDsOfNames( _Command *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 command *command = impl_from_Command( iface ); + HRESULT hr; + ITypeInfo *typeinfo; + + TRACE( "%p, %s, %p, %u, %u, %p\n", command, debugstr_guid(riid), names, count, lcid, dispid ); + + hr = get_typeinfo(Command_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_GetIDsOfNames(typeinfo, names, count, dispid); + ITypeInfo_Release(typeinfo); + } + + return hr; }
static HRESULT WINAPI command_Invoke( _Command *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 command *command = impl_from_Command( iface ); + HRESULT hr; + ITypeInfo *typeinfo; + + TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", command, member, debugstr_guid(riid), lcid, flags, params, result, excep_info, arg_err ); - return E_NOTIMPL; + + hr = get_typeinfo(Connection_tid, &typeinfo); + if(SUCCEEDED(hr)) + { + hr = ITypeInfo_Invoke(typeinfo, &command->Command_iface, member, flags, params, + result, excep_info, arg_err); + ITypeInfo_Release(typeinfo); + } + + return hr; }
static HRESULT WINAPI command_get_Properties( _Command *iface, Properties **props ) diff --git a/dlls/msado15/main.c b/dlls/msado15/main.c index 0f75c160b24..f4ecf3247f1 100644 --- a/dlls/msado15/main.c +++ b/dlls/msado15/main.c @@ -179,6 +179,7 @@ static ITypeLib *typelib; static ITypeInfo *typeinfos[LAST_tid];
static REFIID tid_ids[] = { + &IID__Command, &IID__Connection, };
diff --git a/dlls/msado15/msado15_private.h b/dlls/msado15/msado15_private.h index a5b22f29446..a95a24b6dfa 100644 --- a/dlls/msado15/msado15_private.h +++ b/dlls/msado15/msado15_private.h @@ -43,6 +43,7 @@ static inline WCHAR *strdupW( const WCHAR *src ) }
typedef enum tid_t { + Command_tid, Connection_tid, LAST_tid } tid_t;