代码之家  ›  专栏  ›  技术社区  ›  Matthew King

在Windows中以编程方式重新启动USB设备

  •  5
  • Matthew King  · 技术社区  · 14 年前

    我正在开发的一些软件需要一个USB设备(我将它作为串行端口与USB-to-UART网桥进行交互)。

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

    如何在WindowsXP/Vista/7中使用.NETFramework以编程方式重新启动USB设备?

    1 回复  |  直到 6 年前
        1
  •  8
  •   Dr. belisarius    14 年前

    WDK (Windows驱动程序工具包)。提供了大量的源代码示例,但需要一个陡峭的学习曲线。

    Devcon 微软为演示目的开发的程序 有时 你想干什么就干什么。但请注意,这是奇怪的和野生的。无论如何,源代码是提供的,所以如果你喜欢弄乱设备驱动程序,你可以推出自己的“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.