Mike McCormack [mike@codeweavers.com] wrote:
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return ERROR_CALL_NOT_IMPLEMENTED;
+}
You SetLastError or return an error code, not both.
This is not always correct. Win32 API has several functions returning an int where the only SDK documentation is that the function returns 0 on success and anything else on failure.
What those usually seem to do is retuning the (internal) error code. Relying on such a return value being anything than 0 or !0 of course would be bad programming, since there will be potential differences between different platforms but it does happen.
Rolf Kalbermatter