windows: Fix libusb_get_device_list failure if virual usb host installled

If a virtual usb host driver install, but no port on that.
libusb_get_device_list will return failure.

but it should skip this host devices.

the below is virtual host control information

============USB Host Controller =======================

        +++++++++++++++++ Device Information ++++++++++++++++++
	Device Description       : Leostream Corporation Virtual USB
	Host Controller
	Device Path              :
	\\?\root#system#0004#{3abf6f2d-71c4-462a-8a92-1e6861e6af27}
	Device ID                : ROOT\SYSTEM\0004
	Hardware IDs             : *lsusbdhcDevice
	Driver KeyName           :
	{4d36e97d-e325-11ce-bfc1-08002be10318}\0049
	(GUID_DEVCLASS_SYSTEM)
	Driver                   :
	\SystemRoot\System32\drivers\lsusbdbus.sys (Version: 6.3.2.2570
	Date: 2018-11-12)
	Driver Inf               : C:\WINDOWS\inf\oem25.inf
	Legacy BusType           : Internal
	Class                    : System
	Class GUID               :
	{4d36e97d-e325-11ce-bfc1-08002be10318} (GUID_DEVCLASS_SYSTEM)
	Interface GUID           :
	{3abf6f2d-71c4-462a-8a92-1e6861e6af27}
	(GUID_DEVINTERFACE_USB_HOST_CONTROLLER)
	Service                  : lsusbdbus
	Enumerator               : ROOT
	Location Info            : -
	Manufacturer Info        : Leostream Corporation
	Capabilities             : 0x00 (-)
	Status                   : 0x0180200B (DN_ROOT_ENUMERATED,
	DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_NT_ENUMERATOR,
	DN_NT_DRIVER)
	Problem Code             : 0
	Power State              : D0 (supported: D0, D3)

	HcInfo0 Error            : ERROR_INVALID_FUNCTION

	Roothub Symbolic Link    : LSUSBDBUS

	BusStatistics Error      : ERROR_INVALID_FUNCTION

	DriverVersion Error      : ERROR_INVALID_FUNCTION

	BandwidthInfo Error      : ERROR_INVALID_FUNCTION

	PowerInfo Error          : ERROR_INVALID_FUNCTION

Closes #608

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
2 files changed
tree: a64ef43637490c51784657f9cc9aab45b4f77358
  1. .private/
  2. android/
  3. doc/
  4. examples/
  5. libusb/
  6. msvc/
  7. tests/
  8. Xcode/
  9. .gitattributes
  10. .gitignore
  11. .travis.yml
  12. appveyor.yml
  13. appveyor_cygwin.bat
  14. appveyor_minGW.bat
  15. AUTHORS
  16. autogen.sh
  17. bootstrap.sh
  18. Brewfile
  19. ChangeLog
  20. configure.ac
  21. COPYING
  22. INSTALL_WIN.txt
  23. libusb-1.0.pc.in
  24. Makefile.am
  25. NEWS
  26. PORTING
  27. README.git
  28. README.md
  29. TODO
  30. travis-autogen.sh
README.md

libusb

Build Status Build status Coverity Scan Build Status

libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD and Haiku userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).

libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.

libusb homepage: http://libusb.info/

Developers will wish to consult the API documentation: http://api.libusb.info

Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info

(Please use the mailing list rather than mailing developers directly)