[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Conformance tests for LoadStringW and LoadStringA
From:       Christopher <raccoonone () procyongames ! com>
Date:       2008-02-29 20:04:34
Message-ID: 47C86552.7000901 () procyongames ! com
[Download RAW message or body]

wine-devel-request@winehq.org wrote:
> Message: 3
> Date: Fri, 29 Feb 2008 12:50:53 +0100
> From: Alexandre Julliard <julliard@winehq.org>
> Subject: Re: Conformance tests for LoadStringW and LoadStringA
> To: Christopher <raccoonone@procyongames.com>
> Cc: wine-devel@winehq.org
> Message-ID: <87y794yo9u.fsf@wine.dyndns.org>
> Content-Type: text/plain; charset=us-ascii
> 
> Christopher <raccoonone@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@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic