Robert Shearman escribió:
Alex Villací­s Lasso wrote:
Here is a patch that implements my hunch. This patch fixes the problem on both my test app at bug #6638 and the tax app I try to run.

There are a lot of wrong ways to fix the particular bug you are looking at, but only one right way. If you have a doubt, then you should write a test program.

Anyway, does the attached patch fix the test app for you?

------------------------------------------------------------------------

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index a12deb1..263d2c2 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -5562,11 +5562,15 @@ static HRESULT WINAPI ITypeInfo_fnInvoke
                     }
                     else
                     {
-                        VARIANTARG *missing_arg = 
INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams);
-                        V_VT(arg) = VT_VARIANT | VT_BYREF;
-                        V_VARIANTREF(arg) = &missing_arg[i];
-                        V_VT(V_VARIANTREF(arg)) = VT_ERROR;
-                        V_ERROR(V_VARIANTREF(arg)) = DISP_E_PARAMNOTFOUND;
+                        if (rgvt[i] == (VT_VARIANT | VT_BYREF))
+                        {
+                            VARIANTARG *missing_arg = 
INVBUF_GET_MISSING_ARG_ARRAY(buffer, func_desc->cParams);
+                            V_VT(arg) = VT_VARIANT | VT_BYREF;
+                            V_VARIANTREF(arg) = &missing_arg[i];
+                            arg = &missing_arg[i];
+                        }
+                        V_VT(arg) = VT_ERROR;
+                        V_ERROR(arg) = DISP_E_PARAMNOTFOUND;
                     }
                 }
                 else
------------------------------------------------------------------------


Yes, it does fix the bug. Thanks! So, was it only a coincidence that the failing case was an Append procedure in a class that also had an _Append procedure?

--
The following cryptic message was allegedly found in the inner edge of a Windows
XP installation CD:

4F6E65204F5320746F2072756C65207468656D20616C6C2C204F6E65204F5320746F2066696E6420
7468656D2C0D0A4F6E65204F5320746F206272696E67207468656D20616C6C20616E6420696E2074
6865206461726B6E6573732062696E64207468656D2E0A

It is rumored that only a true Unix Wizard can decypher this mysterious message,
which supposedly encodes the true nature and purpose of the software.



Reply via email to