Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
I could of course leave the 'not-so-clean' way of setting the size out:
if (!lpDisplayName && lpcchBuffer && !ret && (GLE ==
ERROR_INSUFFICIENT_BUFFER)) { /* Request for buffersize. * * Only set the size for ERROR_INSUFFICIENT_BUFFER */ size = sizeW * sizeof(WCHAR); } else if (lpDisplayName && lpcchBuffer && !ret) { /* Request for displayname. * * size has to be set if this fails */ size = sizeW * sizeof(WCHAR); }
This shouldn't be sizeof(WCHAR), it should be 2 as in "at most 2 A chars for each W char". Of course the end result is the same...
Yeah, I thought about that because it could be confusing.
Will change that and sent the new patches.
Cheers,
Paul.