PATCH: better debug for VT_*1 and VT_*2
Marcus Meissner
meissner at suse.de
Sat Mar 26 06:43:24 CST 2005
Hi,
Ciao, Marcus
Changelog:
Format VT_UI1, VT_I1, VT_UI2, VT_I2 correctly.
Index: tmarshal.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/tmarshal.c,v
retrieving revision 1.45
diff -u -r1.45 tmarshal.c
--- dlls/oleaut32/tmarshal.c 25 Mar 2005 16:38:37 -0000 1.45
+++ dlls/oleaut32/tmarshal.c 26 Mar 2005 12:41:11 -0000
@@ -502,14 +504,24 @@
case VT_ERROR:
case VT_UINT:
case VT_I4:
- case VT_I2:
- case VT_I1:
case VT_R4:
case VT_UI4:
+ hres = S_OK;
+ if (debugout) TRACE_(olerelay)("%lx",*arg);
+ if (writeit)
+ hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
+ return hres;
+ case VT_I2:
case VT_UI2:
+ hres = S_OK;
+ if (debugout) TRACE_(olerelay)("%04lx",*arg & 0xffff);
+ if (writeit)
+ hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
+ return hres;
+ case VT_I1:
case VT_UI1:
hres = S_OK;
- if (debugout) TRACE_(olerelay)("%lx",*arg);
+ if (debugout) TRACE_(olerelay)("%02lx",*arg & 0xff);
if (writeit)
hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
return hres;
@@ -878,19 +1055,35 @@
case VT_ERROR:
case VT_BOOL:
case VT_I4:
- case VT_I2:
- case VT_I1:
case VT_UINT:
case VT_R4:
case VT_UI4:
- case VT_UI2:
- case VT_UI1:
if (readit) {
hres = xbuf_get(buf,(LPBYTE)arg,sizeof(DWORD));
if (hres) ERR("Failed to read integer 4 byte\n");
}
if (debugout) TRACE_(olerelay)("%lx",*arg);
return hres;
+ case VT_I2:
+ case VT_UI2:
+ if (readit) {
+ DWORD x;
+ hres = xbuf_get(buf,(LPBYTE)&x,sizeof(DWORD));
+ if (hres) ERR("Failed to read integer 4 byte\n");
+ memcpy(arg,&x,2);
+ }
+ if (debugout) TRACE_(olerelay)("%04lx",*arg & 0xffff);
+ return hres;
+ case VT_I1:
+ case VT_UI1:
+ if (readit) {
+ DWORD x;
+ hres = xbuf_get(buf,(LPBYTE)&x,sizeof(DWORD));
+ if (hres) ERR("Failed to read integer 4 byte\n");
+ memcpy(arg,&x,1);
+ }
+ if (debugout) TRACE_(olerelay)("%02lx",*arg & 0xff);
+ return hres;
case VT_BSTR|VT_BYREF: {
BSTR **bstr = (BSTR **)arg;
WCHAR *str;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050326/0a116427/attachment.pgp
More information about the wine-patches
mailing list