Conformance tests for LoadStringW and LoadStringA

Christopher raccoonone at procyongames.com
Fri Feb 29 14:04:34 CST 2008


wine-devel-request at winehq.org wrote:
> Message: 3
> Date: Fri, 29 Feb 2008 12:50:53 +0100
> From: Alexandre Julliard <julliard at winehq.org>
> Subject: Re: Conformance tests for LoadStringW and LoadStringA
> To: Christopher <raccoonone at procyongames.com>
> Cc: wine-devel at winehq.org
> Message-ID: <87y794yo9u.fsf at wine.dyndns.org>
> Content-Type: text/plain; charset=us-ascii
>
> Christopher <raccoonone at procyongames.com> writes:
>
>   
>> > +        ok(!memcmp(copiedstring, returnedstring, (length2 + 1)*sizeof(WCHAR)),
>> > +            "LoadStringW returned a string that does not match the string pointed to by the pointer it returned. \
>> > +             returnedstring = %ls, copiedstring = %ls", (wchar_t *)returnedstring, (wchar_t *)copiedstring);
>>     
>
> You cannot cast a WCHAR* to a wchar_t*.
>
> -- Alexandre Julliard julliard at winehq.org

Thanks, I assumed they were the same since under Windows WCHAR is 
typedef'ed as wchar_t. Is the proper way to handle this to use 
WideCharToMultiByte() on returnedstring and copiedstring, and then pass 
the converted (multibyte) strings to ok()?

Christopher Berner



More information about the wine-devel mailing list