Alistair Leslie-Hughes : msado15: Implement Dispatch functions in _Command.
Alexandre Julliard
julliard at winehq.org
Fri Feb 26 14:39:29 CST 2021
Module: wine
Branch: master
Commit: 7beb6e85e3161c3eda04358ca2dcf7b23c2fcc73
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7beb6e85e3161c3eda04358ca2dcf7b23c2fcc73
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Fri Feb 26 19:02:22 2021 +1100
msado15: Implement Dispatch functions in _Command.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 f6b1b0fdf52..09d903fdd11 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;
More information about the wine-cvs
mailing list