问题标签 [driver]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
219 浏览

c - 从驱动程序启动应用程序

我可以从驱动程序代码启动另一个应用程序吗?代码用 C 语言编写并用 DDK 编译。

0 投票
5 回答
10029 浏览

windows - 学习编写 Windows 驱动程序

对于学习编程驱动程序的资源,您会推荐什么。我正在通过编程 Microsoft Windows 驱动程序模型,但我想知道是否有任何示例与 vista 兼容。此外,到目前为止,这本书更多地是内核函数的参考。它们是一种资源,可以帮助初学者制作更中间的 wdm 驱动程序吗?我已经完成了基本的“hello world”驱动程序。

谢谢

0 投票
4 回答
5554 浏览

c++ - 为什么有些设备不能用 SetupDiGetDeviceInterfaceDetail() 枚举?

我正在维护一个应用程序,它使用 SetupDiGetDeviceInterfaceDetail() 来查找有关计算机上已安装串行端口的信息。我在测试时注意到有一些设备,例如我的 Lucent WinModem,没有出现在该枚举中。事实证明,我公司生产的一组实现串行端口接口的设备也遇到了类似的问题。我的假设是设备的 INF 文件中缺少某些内容。有谁知道什么样的条件会导致这种遗漏?

编辑:这是我用来枚举串行端口的代码示例。我尝试了各种标志组合,但在行为上没有看到任何显着差异。

0 投票
3 回答
3999 浏览

c++ - Windows API:检测驱动程序安装何时完成

我正在编写一些使用 Windows蓝牙 API自动连接蓝牙设备的软件。当它连接时,Windows 会自动开始安装蓝牙 HID 设备驱动程序,如预期的那样:

安装蓝牙 HID 驱动程序

这大约需要 10-15 秒,之后 Windows 会显示熟悉的“准备使用”消息:

硬件已安装并可以使用

问题是BluetoothSetServiceState()驱动程序安装开始后立即返回,而不是在设备实际准备好使用时返回。这会给我的代码带来一些问题,因为它在“连接”后立即调用一个单独的库进行设备通信。前几个调用失败是因为驱动程序尚未完成安装,并且进行这些连接尝试似乎会干扰驱动程序安装,因为如果我在驱动程序安装完成之前尝试使用通信库 Windows 想要在设备可以之前重新启动使用。

我正在寻找的是一种在驱动程序安装实际完成时挂钩“准备使用”事件的方法,因此我不会过早地调用我的通信库。是否有一些 Windows API 调用可用于注册函数回调或直接轮询驱动程序安装的状态?

我正在用普通的 C/C++ 编写这个,而不是 .NET。谢谢你的帮助!

0 投票
3 回答
405 浏览

c# - Why can't my software initialize hardware on a different motherboard?

I am not a developer, but I think that my question is interesting enough (and I am desperate enough) to post here on stackoverflow

My company uses a program written in C# to drive a kiosk PC that uses .Net 2.0 SP1 and a USB signature pad. The signature pad is a HID that uses the generic Microsoft HID driver.

We tried to install our software on a kiosk PC that uses a different brand of motherboard than we previously used. We moved from a Gigabyte board to an ASUS board. Other than the brand, the specs are identical, same north bridge, same south bridge, same CPU, same host controllers etc. Also, our install procedure is documented and hasn't changed in months.

On the new motherboard, the signature pad is recognized as a HID, installs without an issue, and the manufacturers software can run the device, but our software does not recognize that device is even connected. The only thing that has changed is the motherboard brand. The manufactures software that can initialize the device is not written in C#.

Any thoughts, suggestions, or solutions are welcome!!!!

0 投票
3 回答
23093 浏览

driver - 编写 Windows 打印机驱动程序

我想用 C++ 或 C# 编写一个应用程序,它在安装时将充当打印机驱动程序。它将在“打印”对话框的下拉列表中可用,但不会打印,而是会调用我的代码。

我认为可能有一些 Windows 提供的接口来编写打印机驱动程序。

0 投票
2 回答
1437 浏览

windows - windows下添加或扩展文件系统支持

我已经看到Mac Drive 7为硬盘和 CD 的 Windows 添加了 HFS+ 和 HFS 支持,其中包括处理诸如 mac 分区格式之类的问题。显然,这一定意味着 Windows 中的文件系统支持可以以某种方式扩展,即使速度很慢。那么有人可以从哪里开始为 Windows 编写一个简单(或不)的文件系统驱动程序?我在谷歌上搜索时遇到了很多麻烦,因为这些是常用词。

0 投票
2 回答
9808 浏览

windows-installer - 如何部署基于 .inf 的驱动程序?

我想用我的安装程序部署一个基于 .inf 的 USB 驱动程序。

我猜 .inf 需要放在%SystemRoot%\inf.cat 中(我猜是 WHQL 认证?)和 .sys 文件。我该怎么处理这些?

编辑:已解决,感谢有用的答案。我能够 P/Invoke 该功能,所以我有一个运行以下代码的安装后操作:

0 投票
2 回答
736 浏览

graphics - GMA 950 硬件的寄存器级编程

我正在尝试为 GMA 950 硬件编写基本驱动程序。我一直在寻找数据表或一些编程指南,但找不到任何东西。我还查看了 Linux 和 FreeBSD 源代码,但它们非常大,需要时间才能理解。GMA 950 与 Intel 945 Express 芯片组相关联。有谁知道我可以为 950 和/或 945 编写硬件寄存器级代码的好文档?

谢谢,调频

0 投票
3 回答
2772 浏览

boost - 在应用程序的 WDK 构建环境中使用 boost?

我正在使用 Windows 驱动程序工具包 (WinDDK 6001.18001) 来构建我的用户空间应用程序,而不是 Visual Studio 2005。我采用这种方法是因为我们还必须构建驱动程序组件,所以我希望有一个单一的构建环境来构建一切. Microsoft 本身将这种方法用于多种产品。

在我开始使用 Boost 1.38.0 之前,这一切正常。我没有在内核模式组件中使用 C++,只是在用户空间应用程序中使用。在 C++ 代码中,使用 boost 库是很自然的。不幸的是,WDK 不同意。

我注意到的第一个错误是“#include <cstddef>”没有ptrdiff_t按照附件 D 的要求放入 std 命名空间。解决这个问题在boost\lambda\detail\operator_return_type_traits.hppabout中留下了几个错误,error C2976: 'std::basic_string' : too few template arguments.它似乎与 iostream 是多余的。

有没有人成功地将 Boost、iostream 和 WDK 组合在一起工作?

我的源文件:

服务.cpp: