> 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) >
You're missing my point (or maybe you're not and you just don't agree with me - in either case, let me make my point in a clearer way). If windows doesn't say it won't change the last error, we, as programmers, should assume that it might. In my experience, a large number of functions that set last error on failure set it to ERROR_SUCCESS on success. For the few that don't, I would consider this an oversight on MS's part, and I wouldn't expect it to exist in all implementations of a particular function (across OS versions). Just my 0.02. Kelly
