Rob Shearman : oleaut32: Add support for named arguments in
ITypeInfo:: Invoke.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 6 15:23:22 CST 2007
Module: wine
Branch: master
Commit: 21140a9a53a6cd025f1c83bbfd388a4632a28de6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=21140a9a53a6cd025f1c83bbfd388a4632a28de6
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Feb 6 19:25:27 2007 +0000
oleaut32: Add support for named arguments in ITypeInfo::Invoke.
---
dlls/oleaut32/typelib.c | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index f61f460..508bb89 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -5485,6 +5485,29 @@ static HRESULT WINAPI ITypeInfo_fnInvoke
for (i = 0; i < func_desc->cParams; i++)
{
USHORT wParamFlags = func_desc->lprgelemdescParam[i].u.paramdesc.wParamFlags;
+ VARIANTARG *src_arg;
+
+ if (pDispParams->cNamedArgs)
+ {
+ USHORT j;
+ src_arg = NULL;
+ for (j = 0; j < pDispParams->cNamedArgs; j++)
+ {
+ if ((func_desc->invkind & INVOKE_PROPERTYPUT) &&
+ (pDispParams->rgdispidNamedArgs[j] == DISPID_PROPERTYPUT))
+ {
+ src_arg = &pDispParams->rgvarg[0];
+ break;
+ }
+ if (pDispParams->rgdispidNamedArgs[j] == i)
+ {
+ src_arg = &pDispParams->rgvarg[j];
+ break;
+ }
+ }
+ }
+ else
+ src_arg = i < pDispParams->cArgs ? &pDispParams->rgvarg[pDispParams->cArgs - 1 - i] : NULL;
if (wParamFlags & PARAMFLAG_FRETVAL)
{
@@ -5507,9 +5530,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke
break;
}
}
- else if (i < pDispParams->cArgs)
+ else if (src_arg)
{
- VARIANTARG *src_arg = &pDispParams->rgvarg[pDispParams->cArgs - 1 - i];
dump_Variant(src_arg);
if (rgvt[i] == VT_VARIANT)
More information about the wine-cvs
mailing list