[RESEND] regedit: Convert from WCHAR size to maximum required
billmedland at shaw.ca
Thu Apr 5 08:43:53 CDT 2007
On Thu, 2007-05-04 at 12:03 +0900, Byeong-Sik Jeon wrote:
> MS-Windows's RegQueryKeyInfo function test result:
> 1. MSDN means TCHARS when it says 'character' for this function.
> ==> No.
> 2. why RegQueryInfoKey is returning a number that is too small
> ==> No. Currently Wine's RegQueryInfoKey set the right values.
> Thank you.
I confess that I have not tested this. I think it is sufficiently
counterintuitive that it would be useful if you could submit a test that
would demonstrate it, e.g. put a non-SBCS string into the registry in
Unicode, query and get it back out, demonstrating that the size returned
is the number of lexical characters (plus 1 in Win95/98/me?).
And if this is the case then your original fix is still incorrect; we
would need to multiply the size not by sizeof(TCHAR) but by the maximum
number of bytes required to hold a lexical character (which is
presumably going to have to handle UTF-8).
More information about the wine-devel