I know it's an old technology, but I'm curious, do Windows GDI APIs return error codes in GetLastError()? I have several instances when DeleteObject and DeleteDC fail but error code is returned as 0.
Most GDI functions do not use GetLastError()
. GDI functions that are capable of reporting specific errors will return error codes directly in their return values. Not all GDI functions can report specific errors, though.