在使用 LibUsbDotNet 库编译 C# 程序时,在您的帖子发布一年后偶然发现了同样的问题:
PS C:\src\FaultMonitor\FaultMonitor\bin\Debug> .\FaultMonitor.exe -u
An error occured while executing the proxy:
libusb-1.0.dll not found. If this is a 64bit operating system, ensure that the 6
4bit version of libusb-1.0.dll exists in the '\Windows\System32' directory.
at MonoLibUsb.MonoUsbSessionHandle..ctor()
对于处于类似困境的任何人,请下载libusb库并提取内容(您将需要7zip)。在提取的内容中,将 复制\MS32\dll\libusb-1.0.dll
到您的C:\windows\SysWOW64\
文件夹中并将 复制\MS64\dll\libusb-1.0.dll
到您的C:\windows\System32\
. 之后,程序运行没有问题:
PS C:\src\FaultMonitor\FaultMonitor\bin\Debug> .\FaultMonitor.exe -u
[15-10-23.02:09:05][+] Device: VendorID: 4203, ProductID: 63, Address: 1
[15-10-23.02:09:05][+] Device: VendorID: -32530, ProductID: 33, Address: 2