From: He.David <Dav...@IG...> - 2011-01-25 01:44:32
|
Hi, Does anyone can help me to figure out why I got this compiler error? How to pass the call back function in this case? void transfer_cb_fn (libusb_transfer* transfer){ cout<<"call back function called"<<endl; } Void main(...){ ... libusb_transfer* transfer; libusb_fill_interrupt_transfer (transfer, dev_handle, 129, data, 20, transfer_cb_fn, user_data, 10000); } Error message: error C2664: 'libusb_fill_interrupt_transfer' : cannot convert parameter 6 from 'void (__cdecl *)(libusb_transfer *)' to 'libusb_transfer_cb_fn' 2> None of the functions with this name in scope match the target type Thanks. David |