As is always the case with programming interfaces, native driver code should check the error returns from calls to system services. The new driver model includes the following 32-bit error return type:
typedef long OSStatus;
The lower 16 bits of OSStatus are equivalent to the existing OSErr type, described in Inside Macintosh: Overview. In current versions of Mac OS, the upper 16 bits contain the sign extension of the lower 16 bits. At present there are just two possible values for the upper 16 bits, all 1s or all 0s; other values are reserved for future use by Apple.