我正在开发的某些软件需要存在USB设备(我与USB到UART桥相互作用)。

有时,在冬眠重新启动计算机后,没有检测到该设备,我无法再通过其串行端口写入或从设备上读取或读取设备。读/写入对设备的访问是必要的。

我不能依靠用户采取任何操作(物理或其他方式),因此我需要一种方法来编程重新启动设备。

我应该如何使用.NET框架在Windows XP/Vista/7中以程序为程序上重新启动USB设备?

有帮助吗?

解决方案

您可以使用 wdk (Windows驱动程序套件)。提供了许多源代码示例,但期望陡峭的学习曲线。

DEVCON 是由MS开发的用于演示目的的程序 有时 工作并做您想要的。但是请注意,这很奇怪和狂野。无论如何,提供了源代码,因此,如果您想弄乱设备驱动程序,则可以滚动自己的“ DevCon”代码。

从MS网站:

DevCon (Devcon.exe), the Device Console, is a command-line tool that displays detailed information about devices. Using DevCon, you can search for and manipulate devices from the command line. DevCon enables, disables, installs, configures, and removes devices on the local computer and displays detailed information about devices on local and remote computers.

恩!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top