[PATCH 2/3] [Dnsapi.dll] Implement Dnsapi.dll
rolf.kalbermatter at citeng.com
Thu Mar 2 00:58:30 CST 2006
Mike McCormack [mike at 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.
More information about the wine-devel