December 2011
Intermediate to advanced
485 pages
15h 47m
English
As we will see in our later discussion of IOUSBLib classes, many methods perform operations that complete asynchronously. All such asynchronous methods take two parameters, a pointer to a callback function and a parameter named “refcon” that allows the application to pass an arbitrary context value to its callback. The callback function has the following signature:
void MyCallbackFunction (void* refcon, IOReturn result, void* arg0);
The first parameter, refcon, is the application's arbitrary context parameter. The second parameter reports the overall result of the operation; a value of kIOReturnSuccess indicates the operation completed successfully. The final argument, arg0, is provided by the IOUSBLib and ...
Read now
Unlock full access