Thomas Weidenmueller wine-patches@reactsoft.com writes:
LoadString() cannot be used to measure the length of a string resource. It will not return the length of the string if no buffer is provided, instead it will return 0! This patch fixes the broken property sheet code.
Since you are going to the trouble of loading it all by hand, you should allocate and fill the buffer right away, instead of returning only the length and letting LoadString do the whole thing once again.
Also a test case for LoadString demonstrating that the current behavior is wrong would be a good idea.
Alexandre Julliard julliard@winehq.org writes:
Thomas Weidenmueller wine-patches@reactsoft.com writes:
LoadString() cannot be used to measure the length of a string resource. It will not return the length of the string if no buffer is provided, instead it will return 0! This patch fixes the broken property sheet code.
Since you are going to the trouble of loading it all by hand, you should allocate and fill the buffer right away, instead of returning only the length and letting LoadString do the whole thing once again.
Also a test case for LoadString demonstrating that the current behavior is wrong would be a good idea.
At first sight it's a simple matter of extending the resource test (user dll) by adding {0, 0} to the test variable. At second sight creation of a new test is needed, as the current one tests LoadStringA only... Anyway, you can use that as a template.