I have posted this problem already long time ago but I never found the time to test it again.
http://www.winehq.org/hypermail/wine-devel/2002/11/1530.html
But now I tried with the actual wine from cvs (2003-12-03) and it's still there. The problem is that if I try to create a table in a Access database the last char of the name gets lost. I now have a small program which shows this error, maybe someone can use it for finding this bug. It's a simple VC6 Wizard generated Win32 command line app which uses MFC for DAO.
The first time I tried was with SUSE 8.0, now I have Knoppix 3.3 (Debian).
I also found that it can happen not only on column names but also on table field names. But most work ok. So it can't be that a general error as a wrong string function (I guess a lot more programs would have problems if it were this basic). Another guess is Variants. There are quite some calls to Variant functions but I couldn't find a culprit.
I think I found an error in SysStringLen. Why? Because my application started to work a lot better. Why not? I don't know if this is the right fix or other stuff is involved (as with the GetWindowLong).
* The length of the string (in bytes) is contained in a DWORD placed * just before the BSTR pointer */ bufferPointer = (DWORD*)str; bufferPointer--; return (int)(*bufferPointer/sizeof(WCHAR));
If I come here with a string like "Nodes" (normal string length 5) it will return (int)(5/2)=2. But 2 is definitely not enough (in WCHAR length). But if I do (int)((5+1)/2)=3 my name comes through. And also the other names that got truncated. So I would change it to:
return (int)((*bufferPointer+1)/sizeof(WCHAR));
Can anybody comment on this? Is this the right fix?
bye Fabi