comctl32: Fix loading string from resources

Ferenc Wagner wferi at tba.elte.hu
Thu Jun 1 05:42:02 CDT 2006


Alexandre Julliard <julliard at winehq.org> writes:

> Thomas Weidenmueller <wine-patches at 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.
-- 
Feri.



More information about the wine-devel mailing list