[1/2] oleaut32: Add support for handling VT_VARIANT|VT_ARRAY|VT_BYREF argument type. Resend.
Dmitry Timoshkov
dmitry at baikal.ru
Tue Sep 8 01:08:57 CDT 2015
It looks like widl generates broken typelib for new test and this leads
to test failures under Windows. I'll try to investigate the reasons and
find a possible fix for widl typelib generation code, but for now resending
without a test case with passing SAFEARRAY as a reference.
---
dlls/oleaut32/typelib.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index f4bba71..650fa21 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -7078,7 +7078,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
V_VT(&rgvarg[i]) = rgvt[i];
}
- else if (rgvt[i] == (VT_VARIANT | VT_ARRAY) && func_desc->cParamsOpt < 0)
+ else if ((rgvt[i] == (VT_VARIANT | VT_ARRAY) || rgvt[i] == (VT_VARIANT | VT_ARRAY | VT_BYREF)) && func_desc->cParamsOpt < 0)
{
SAFEARRAY *a;
SAFEARRAYBOUND bound;
@@ -7107,7 +7107,10 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
SafeArrayDestroy(a);
break;
}
- V_ARRAY(&rgvarg[i]) = a;
+ if (rgvt[i] & VT_BYREF)
+ V_BYREF(&rgvarg[i]) = &a;
+ else
+ V_ARRAY(&rgvarg[i]) = a;
V_VT(&rgvarg[i]) = rgvt[i];
}
else if ((rgvt[i] & VT_BYREF) && !V_ISBYREF(src_arg))
--
2.4.8
More information about the wine-patches
mailing list