Paul Vriens wrote:
Alexandre Julliard wrote:
Paul Vriens paul.vriens.wine@gmail.com writes:
So how do you suggest I'm going to fix this? Maybe we should call the W function as well as deal with the differences?
If you want to replicate the exact behavior then yes you have to call the W function. But returning the correct size is probably OK too, at least until we find an app that depends on the broken Windows behavior...
Hi again,
What about the attached patch? This fixes all todo_wine's for GetDisplayName with respect to buffer sizes.
Cheers,
Paul.
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 will only mean we leave a few todo_wine's in that will be accompanied with a comment.
Cheers,
Paul.