LibUsbDotNet No devices found when calling UsbDevice.AllDevices

前端 未结 2 703
日久生厌
日久生厌 2021-01-20 05:41

I am executing the example code of LibUsbDotNet which will return me the information of all connected usb devices. You can find this code below.

using System         


        
2条回答
  •  Happy的楠姐
    2021-01-20 06:28

    The documentation says that

    Gets a list of all available USB devices (WinUsb, LibUsb, Linux LibUsb v1.x).

    and

    Use this property to get a list of USB device that can be accessed by LibUsbDotNet.

    If you are using the standard HID driver for your mouse and keyboard and haven't replaced that with the libusb.sys driver, then LibUsbDotNet can't access those devices and therefore doesn't list them.

提交回复
热议问题