2 ms·
some of Windows uses 0 to mean success, and some of Windows doesn't. In cases where there is only one successful result, 0 makes sense. Then nonzero can be a r
by userbinator 2y ago
some of Windows uses 0 to mean success, and some of Windows doesn't.
In cases where there is only one successful result, 0 makes sense. Then nonzero can be a range of error codes. In cases where there is multiple successful results and only one failure, 0 means failure; malloc() is the stereotypical example of this.