Re: [PATCH 2/3] [Dnsapi.dll] Implement Dnsapi.dll
2 Mar
2006
2 Mar
'06
6:58 a.m.
Mike McCormack [mike(a)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
7315
Age (days ago)
7315
Last active (days ago)
0 comments
1 participants
participants (1)
-
Rolf Kalbermatter