Dmitry Timoshkov : oleaut32: Add support for handling VT_VARIANT|VT_ARRAY|VT_BYREF argument type.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 10 08:07:53 CDT 2015


Module: wine
Branch: master
Commit: 97ce5f4874ecd9b16a2dd8d0d64205aab6cba67a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=97ce5f4874ecd9b16a2dd8d0d64205aab6cba67a

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Thu Sep 10 15:17:04 2015 +0800

oleaut32: Add support for handling VT_VARIANT|VT_ARRAY|VT_BYREF argument type.

---

 dlls/oleaut32/tests/tmarshal.c | 1 -
 dlls/oleaut32/typelib.c        | 7 +++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index 6b89774..d200785 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -1602,7 +1602,6 @@ static void test_typelibmarshal(void)
     dispparams.rgdispidNamedArgs = NULL;
     dispparams.rgvarg = vararg;
     hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARG_REF_RUN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
-todo_wine
     ok_ole_success(hr, IDispatch_Invoke);
     SysFreeString(V_BSTR(&vararg[1]));
     SysFreeString(V_BSTR(&vararg[0]));
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))




More information about the wine-cvs mailing list