fixup bogus SetLastError()

Alexandre Julliard julliard at
Mon Jun 4 13:11:23 CDT 2001

Andreas Mohr <a.mohr at> writes:

> objects/gdiobj.c really has no business dealing with SetLastError().
> SetLastError() is a mechanism to communicate errors to external programs,
> so it should definitely not be used for highly internal functions.

You didn't include the gdiobj.c patch, but I disagree with it
anyway... There can be many good reasons for setting last error in
internal functions; for instance setting it inside GDI_GetObjPtr
avoids having to set it in every single caller. And in the very rare
case where this is not what we want, the caller can always set it to
another value.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list