how to pass a non static-member function as a callback?
io_iterator_t enumerator; kern_return_t result; result = IOServiceAddMatchingNotification( mNotifyPort, kIOMatchedNotification, IOServiceMatching( "IOFireWireLocalNode" ), serviceMatchingCallback, (void *)0x1234, & enumerator ); serviceMatchingCallback((void *)0x1234, enumerator); if i declare serviceMatchinCallback as static then it works, but i do not want it to be static. Is there a way to pass it a non-static callback function? Thank you You could keep it static, but use the userdata to store the this pointer in addition to whatever other userdata you want (by packing them into a structure