PATCH: VT_UI8 / VT_I8 marshalling

Marcus Meissner marcus at jet.franken.de
Thu Nov 3 14:14:06 CST 2005


Hi,

an app called ChemDraw marshals VT_UI8 integers.

This patch adds support for those.

Ciao, Marcus

Changelog:
	Added support for VT_I8/VT_UI8 marshalling.

Index: dlls/oleaut32/tmarshal.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tmarshal.c,v
retrieving revision 1.71
diff -u -r1.71 tmarshal.c
--- dlls/oleaut32/tmarshal.c	2 Nov 2005 20:00:00 -0000	1.71
+++ dlls/oleaut32/tmarshal.c	3 Nov 2005 20:12:26 -0000
@@ -445,6 +445,8 @@
 int
 _argsize(DWORD vt) {
     switch (vt) {
+    case VT_UI8:
+	return 8/sizeof(DWORD);
     case VT_R8:
         return sizeof(double)/sizeof(DWORD);
     case VT_CY:
@@ -473,6 +475,9 @@
 	    arrsize *= adesc->rgbounds[i].cElements;
 	return arrsize*_xsize(&adesc->tdescElem);
     }
+    case VT_UI8:
+    case VT_I8:
+	return 8;
     case VT_UI2:
     case VT_I2:
 	return 2;
@@ -501,6 +506,13 @@
     switch (tdesc->vt) {
     case VT_EMPTY: /* nothing. empty variant for instance */
 	return S_OK;
+    case VT_I8:
+    case VT_UI8:
+	hres = S_OK;
+	if (debugout) TRACE_(olerelay)("%lx%lx",arg[0],arg[1]);
+	if (writeit)
+	    hres = xbuf_add(buf,(LPBYTE)arg,8);
+	return hres;
     case VT_BOOL:
     case VT_ERROR:
     case VT_UINT:
@@ -811,6 +823,14 @@
 		return S_OK;
 	    }
 	}
+        case VT_I8:
+        case VT_UI8:
+	    if (readit) {
+		hres = xbuf_get(buf,(LPBYTE)arg,8);
+		if (hres) ERR("Failed to read integer 8 byte\n");
+	    }
+	    if (debugout) TRACE_(olerelay)("%lx%lx",arg[0],arg[1]);
+	    return hres;
         case VT_ERROR:
 	case VT_BOOL:
         case VT_I4:



More information about the wine-patches mailing list