[Wine-patches] [eter-2.1 3/5] oleaut32: Add support for handling VT_VARIANT|VT_ARRAY|VT_BYREF to the typelib marshaller. (eterbug #10717)

Dmitry Timoshkov dmitry на baikal.ru
Пн Сен 14 13:32:55 MSK 2015


---
 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 a639989..8fd8740 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -6496,7 +6496,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;
@@ -6525,7 +6525,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



Подробная информация о списке рассылки Wine-patches