On 2012.05.01 16:52, 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). > > --- > > 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.
I must say that having a new libusbx/Windows supported driver being installed after get_device_list is not something that was anticipated when designing the Windows backend, as the expectation on Windows was that, during the course of usage of libusbx (init -> exit), drivers are not going to be installed/uninstalled. The reason is that, unlike other OSes, the installation of drivers on Windows is a very intrusive operation that you want to complete before launching any application that relies on said driver. Is there a specific reason why you can't go through a libusbx reinit (exit then init) after having installed your driver? This is what I would expect any application to do, that installs a driver with the aim of it being used in libusbx/Windows, and I don't expect any issue if you do that. Detecting newly installed drivers during the course of operation of libusbx borders on hotplug, which is something that is planned for v2.0, so I would prefer delaying the introduction of such a patch for when we devise a complete hotplug solution (especially as I anticipate some further rework of enumeration then). Thus, if going through a libusbx reinit can work, I would suggest doing it that way. Regards, /Pete ------------------------------------------------------------------------------ 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