各位大神好:求助用Windows7开发USB驱动的时候,在调用了usb_init()之后,调用libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG)) 返回失败,,并且注册的回调函数也不能进入
rc = libusb_hotplug_register_callback (NULL, LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, 0, vendor_id,
product_id, class_id, hotplug_callback, NULL, &hp[0]);
if (LIBUSB_SUCCESS != rc) {
fprintf (stderr, "Error registering callback 0\n");
libusb_exit (NULL);
return EXIT_FAILURE;
} |