io_iterator_t enumerator;
kern_return_t result;
result = IOServiceAddMatchingNotification(
mNotifyPort,
kIOMatchedNotification,
IOServiceMatching( "IOFireWireLocalNode" ),
serviceMatchingCallback,
(void *)0x1234,
& enumerator );
serviceMatchingCallback((void *)0x1234, enumerator);
如果我将 serviceMatchinCallback 声明为静态,那么它可以工作,但我不希望它是静态的。有没有办法给它传递一个非静态回调函数?
谢谢