Hi, when copying variants that contain binary data in BSTR (created with SysAllocStringByteLen with uneven count of bytes, the last byte ist cut off for SysStringLen rounds by 2. The combination SysAllocStringByteLen/SysStringByteLen calculations the right length for all cases. Now MDAC-Functions work also more correct. Olaf ChangeLog: - dlls/oleaut32: variant.c Copy for BSTR-Variants also for uneven count of Bytes.
Index: dlls/oleaut32/variant.c =================================================================== RCS file: /home/wine/wine/dlls/oleaut32/variant.c,v retrieving revision 1.70 diff -u -r1.70 variant.c --- dlls/oleaut32/variant.c 8 Sep 2003 18:37:22 -0000 1.70 +++ dlls/oleaut32/variant.c 15 Sep 2003 17:52:19 -0000 @@ -62,7 +62,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); -#define SYSDUPSTRING(str) SysAllocStringLen((str), SysStringLen(str)) +#define SYSDUPSTRING(str) SysAllocStringByteLen((str), SysStringByteLen(str)) #ifndef FLT_MAX # ifdef MAXFLOAT