GetLastError strangeness with FindClose
Eric Pouech
pouech-eric at wanadoo.fr
Sat Aug 16 14:16:58 CDT 2003
Kelly Leahy wrote:
> Your test doesn't make much sense. The call to FindClose should be done
> after you check the result of GetLastError, since FindClose <should> change
> the last error to ERROR_SUCCESS if the close operation was successful.
>
>>From your test results, it seems that the FindClose implementation on the
> version of windows you're using doesn't seem to do this. I would consider
> this a bug in windows, not a bug in Wine. If a programmer relies on this
> behavior, it's their fault, not MS's or Wine's fault that their code does
> not work
AFAIK, it's never said that a successful function call should set the
last error to 0. This only thing MS claims is that when a function
fails, the last error is set to a error code explaining that error.
Moreover, wine's goal is not to make a better design than windows, but
to mimic windows behavior. So, if FindClose doesn't change the last
error on success, wine should do the same (especially if some known
program depends on it)
A+
--
Eric Pouech
More information about the wine-devel
mailing list