libusb-win32:自动安装驱动程序过滤器
我在使用基于 libusb-w32 的程序来检测设备时遇到了问题。 该程序必须检测数码相机,我需要自动安装驱动程序过滤器,以便检测到任何新相机,而无需任何手动操作。 我使用过 install-filter i --class={6BDD1FC6-810F-11D0-BEC7-08002BE2092F} ,即为 MTP 设备安装过滤器,它似乎有效。但今天我在一台干净的机器上尝试了一下,发现实际上只是看起来如此。尝试使用不同的参数安装过滤器 - 没有运气。 我能够检测设备的唯一方法是使用 inf-wizard.exe。它安装了驱动程序,使我的程序能够检测设备,但也破坏了数码相机的原始 Windows 功能。然后,我卸载了libusb驱动程序,重新安装了原来的Windows驱动程序,执行了 install-filter i --class={6BDD1FC6-810F-11D0-BEC7-08002BE2092F} - 并且该程序仍然能够检测设备。 问题是:如何自动化该过程,以便在不需要用户做任何工作的情况下检测到任何新相机?
更新: 我会缩短这个问题。似乎当我使用 inf-wizard.exe 安装驱动程序时,它除了安装驱动程序本身之外还执行其他操作。我需要确切地知道什么。
提前致谢。
I've faced a problem getting my libusb-w32 based program to detect devices.
The program has to detect digital cameras, and I need to automatically install driver filter for any new camera to be detected without any manual work.
I've used install-filter i --class={6BDD1FC6-810F-11D0-BEC7-08002BE2092F} , i. e. installing filter for MTP devices, and it seemed to work. But today I tried it on a clean machine and found out it actually only seemed that way. Tried install-filter with different parameters - no luck.
The only way I was able to detect devices at all was to use the inf-wizard.exe. It installed the driver, enabling my program to detect devices, but also disrupting the original Windows functionality for digital cameras. Then, I've uninstalled the libusb driver, installed the original windows driver back, executed install-filter i --class={6BDD1FC6-810F-11D0-BEC7-08002BE2092F} - and the program is still able to detect devices.
The question is: how to automate the process so that any new camera is detected without any work required from a user?
Update:
I'll shorten the question. It seems that when I install a driver with inf-wizard.exe, it does something besides installing the driver itself. I need to know what, exactly.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果有人有类似的问题 - 答案在这里:
https://sourceforge.net/mailarchive/forum.php?thread_name=749401313049992%40web78.yandex.ru&forum_name=libusb-win32-devel
In case someone has similar problem - the answer is here:
https://sourceforge.net/mailarchive/forum.php?thread_name=749401313049992%40web78.yandex.ru&forum_name=libusb-win32-devel