make LoadStringW pass tests

Christopher raccoonone at procyongames.com
Wed Mar 5 11:38:05 CST 2008


Changes:
fix LoadStringW so that it will pass conformance tests. Change some 
calls to LoadStringW which depended on the old behavior.

Details:
LoadStringW used to return the length of the resource if called with a 
NULL pointer; this is not how LoadStringW should work. To get only the 
length of the resource pass buflen = 0, and a pointer to a LPWSTR should 
be passed as third argument (this pointer can be to a "junk" variable as 
it will not be needed).
LoadStringW will now return a pointer to the resource itself when called 
with buflen = 0, in this case pass the address of a LPWSTR as the third 
argument to receive the pointer.
I inspected all calls to LoadStringW listed at 
<http://source.winehq.org/ident?i=LoadStringW>, and changed the few that 
depended on the call with NULL pointer behavior.

Christopher Berner
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-make-LoadStringW-pass-conformance-tests.patch
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080305/f253e5e6/attachment.txt 


More information about the wine-patches mailing list