Improved ITypeInfo::Invoke

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog:
- ITypeInfo::Invoke now is able to invoke a function even when it is 
provided with a byref argument (e.g. a function expects a VT_BSTR, but the 
caller gives us a VT_BSTR|VT_BYREF; previously we were just emitting an 
error string in the console and calling the function with a VT_EMPTY argument)

This makes InstallShield installations that use the ComponentSetTarget API 
work as expected :-)

Alberto

-------------------------------
Alberto Massari
eXcelon Corp.
http://www.StylusStudio.com
Index: typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.80
diff -u -r1.80 typelib.c
--- typelib.c   11 Nov 2002 22:24:31 -0000      1.80
+++ typelib.c   13 Nov 2002 15:15:49 -0000
@@ -4300,14 +4300,14 @@
 
                    if (V_VT(arg) == tdesc->vt) {
                        memcpy(&args[argspos],&V_UNION(arg,lVal), arglen*sizeof(DWORD));
-                   } else {
-                       if (tdesc->vt == VT_VARIANT) {
-                           memcpy(&args[argspos],arg, arglen*sizeof(DWORD));
-                       } else {
-                           ERR("Set arg %d to disparg type %d vs %d\n",i,
-                                   V_VT(arg),tdesc->vt
-                           );
-                       }
+                   } else if(V_ISBYREF(arg) && ((V_VT(arg) & ~VT_BYREF)==tdesc->vt)) {
+                       memcpy(&args[argspos],(void*)V_UNION(arg,lVal), arglen*sizeof(DWORD));
+                    } else if (tdesc->vt == VT_VARIANT) {
+                       memcpy(&args[argspos],arg, arglen*sizeof(DWORD));
+                    } else {
+                       ERR("Set arg %d to disparg type %d vs %d\n",i,
+                           V_VT(arg),tdesc->vt
+                       );
                    }
                    argspos += arglen;
                } else {

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux