For example:
OSStatus AudioServicesCreateSystemSoundID (
CFURLRef inFileURL,
SystemSoundID *outSystemSoundID
);
In the Apple's documentation description of this function tells us that the returned value is a "result code". But what code? Why is it "OSStatus"?
what does this error mean? It usually indicates a file (or directory) cannot be found—i.e. a referenced pathname is incomplete or incorrect.
Over the past few days, some of our users have reported to us that they have encountered a list of osstatus error codes. What does this error mean? This usually indicates that the registry (or directory) cannot be found, i.e. the particular path specified is incomplete or incorrect.
As you've said, it's the result code of the function.
Hovewer, different functions have different result codes that you can handle as you wish. for example, for Audio services, the current OSStatus codes are give in the documentation as:
So as you call your functions, you check the returnes OSStatus
and if it's noErr
(which is what 0
is), then you can continue with your next call, otherwise you handle the error accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With