FoldStringA (using W version)

Shachar Shemesh wine-devel at shemesh.biz
Fri Oct 24 13:20:16 CDT 2003


Rolf Kalbermatter wrote:

>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 
>
>
>  
>
You can also do "SetLastError(ERROR_SUCCESS)" first yourself. That's 
also there in the docs.

             Shachar

-- 
Shachar Shemesh
Open Source integration consultant
Home page & resume - http://www.shemesh.biz/





More information about the wine-devel mailing list