FoldStringA (using W version)

Rolf Kalbermatter rolf.kalbermatter at citeng.com
Fri Oct 24 08:42:37 CDT 2003


Jon Griffiths [mailto:jon_p_griffiths at yahoo.com] wrote:

> > +        goto FoldStringA_exit;
> >          ^^^^^^^^^^^^^^^^^^^^^^
> > No allocation has been done yet, just "return 0;" would be
> > enough!
> 
> Indeed, although the above is functionally identical. Feel free to
> submit a patch if you feel strongly about it...
> 
> > Interesting idea, but I wonder how you can distinguish between
> > equal 0 and FALSE without some real magic!
> > Same applies to lstrcmpi
> 
> No magic required. Use GetLastError(), just like it says.

Well so you want to say, if I want to test strings for equality
I do first have to call GetLastError() to check if it was an error
or if they are really equal?

This won't work as by definition a WinAPI function is usually not
supposed to reset the last error if no error has occurred, so
GetLastError() may return an error even though the strings were
just simply equal.

So I think that documentation is just simply wrong, also MSDN
doesn't say anything about this function returning any error
indication.

Rolf Kalbermatter 




More information about the wine-devel mailing list