Uri Lublin wrote: > Only if old backend api is UNSUPPORTED. > > This happens when a libusb driver (e.g. WinUSB) is installed > after a device has been setup/discovered (with get_device_list).
I think this is a bug in the Windows backend. _get_device_list() should never re-use data from a previous call, that's sort of the point of the function, it must always reflect the current state of the system. > We want to install libusb driver for USB devices dynamically > following a request by users. There is a problem however to access > such devices after libusb driver is installed as the backend api is > UNSUPPORTED. > > With this patch, after the WinUSB libusb driver has been installed, > an application only needs to call libusb_get_device_list again such > that it can access the device. IMO that's not really good enough. The library must not have very strong ties to the driver stack state in the operating system. I.e. accessing the device needs to work immediately after the driver has been installed, without first needing a libusb_get_device_list() call. > Is there a better way to change the backend api for a specific > libusb device, after WinUsb driver has been installed for that > device ? My only idea is to have a look at the hotplug code for Windows, perhaps it can provide some inspiration; maybe it handles this case, or if not then maybe a similar one. //Peter ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel