在 Windows 64 位上将 libusb 与 Delphi 一起使用?
读了一点之后,我担心我的 32 位 Delphi 应用程序将无法使用 libusb Windows 7 和其他 64 位 Windows 系统上的 64 位驱动程序,并且它将无法与这些系统上的我的自定义硬件设备通信。这是真的吗?如果是,有什么解决方法吗?我在这张照片中遗漏了什么吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
究竟是什么让您认为它不会?如果您有 64 位驱动程序,则它可以在 64 位系统上使用(假设驱动程序工作正常并且已正确签名)。 32 位和 64 位应用程序都可以通过各种通信机制(例如 Ioctl 或 MMF 文件)控制驱动程序。问题是代码的所有部分是否都正确编写,但这个问题适用于任何库和任何平台
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
在带有 WinUSB 后端(Windows 附带的 Microsoft 驱动程序)的 libusb 1.0 上,我们可以从 x86 应用程序(C# 应用程序使用的托管 c++ 库)与其进行通信。 x86 和 x64 平台上的行为是相同的。
我不知道 libusb 0.1(能够使用 libusb-win32 内核驱动程序的旧版本),但由于您的链接指向 1.0 版本,因此您似乎没有使用它。
< em>在某些时候,libusb 1.0 将支持 libusb-win32 内核驱动程序,但除非在特定情况下,否则没有必要(WinUSB 有一些限制,但我从未遇到过)
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)
我在带有delphi 32位的Win7 64位笔记本电脑上成功使用libusb-win32应用。到目前为止没有问题。驱动程序也已签名(只有我的 .inf 文件未签名)。
请注意,libusb-win32 使用“旧”libusb API。
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.