Bill Medland wrote:
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).
Hi,
I cancel this patch. Please see the "Alexandre Julliard"'s comments. The good solution of this problem is "#define UNICODE".
Thank you.