http://bugs.winehq.org/show_bug.cgi?id=21501
--- Comment #4 from Juan Lang juan_lang@yahoo.com 2010-01-27 16:00:38 --- Closing the handle can cause the last error to change to something spurious, so I had to change the way error handling is done (which I probably should have done in the first place.) I sent a patch series starting here: http://www.winehq.org/pipermail/wine-patches/2010-January/084164.html