[PATCH 1/3] lz32/tests: Test more last errors set by LZOpenFile[AW].

Detlef Riekenberg wine.dev at web.de
Tue Oct 3 13:59:54 CDT 2006


On Di, 2006-10-03 at 20:40 +0300, Saulius Krasuckas wrote:

> > It makes sense to check last error value only if an API has failed, 
> > while you are adding last error checks everywhere. Unless you have an 
> > application that depends on it, that's wrong.
> 
> Well, thanks.  I'll change that, but is it wrong just because it slightly 
> increases code complexity for no direct benefit?  I just want to know for 
> future.

For the normal case, SetLastError() is called only on failure.

http://msdn.microsoft.com/library/en-us/debug/base/setlasterror.asp

There might be some broken Applications, that expect GetLastError() to
return a special Value, even when a Function returns success, but they
will fail very fast on native Windows with a different version of 
Windows, SP, Hotfix or Driver.

Do you have such a Application?


-- 
 
By by ... Detlef





More information about the wine-devel mailing list