comctl32: Fix loading string from resources

Alexandre Julliard julliard at winehq.org
Thu Jun 1 04:53:06 CDT 2006


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.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list