问题
After reading a little, I am concerned that my 32-bit Delphi application will not be able to use libusb 64-bit driver on Windows 7 and other 64-bit Windows systems, and that it will not be able to talk to my custom hardware device on those systems. Is this true? If yes, is there some workaround? Am I missing something in this picture?
回答1:
On libusb 1.0 with the WinUSB backend (Microsoft driver included with windows) we have no problem to communicate with it from an x86 app (Managed c++ library used by C# applications). The behavior is the same on both x86 and x64 platforms.
I don't know about libusb 0.1 (The old one that is able to use the libusb-win32 kernel driver) but as your link point to the 1.0 version you don't seem to use that.
At some point libusb 1.0 will support the libusb-win32 kernel driver but except in specific cases it isn't necessary (WinUSB have some limitations but I never ran into them)
回答2:
What exactly makes you think that it won't? If you have 64-bit driver, it's usable on 64-bit system (given that the driver works fine and is signed properly). Both 32-bit and 64-bit applications can control the driver via various communication mechanisms, such as Ioctl or MMF files. The question is if all parts of the code are written correctly, but this question applies to any library and on any platofrm
回答3:
I use libusb-win32 sucessfully on my Win7 64 Bit laptop with a delphi 32 Bit application. No problems so far. The driver is signed, too (only my .inf file is not).
Note that libusb-win32 uses the "old" libusb API.
来源:https://stackoverflow.com/questions/4803092/use-libusb-with-delphi-on-windows-64-bit