从 winDDK 安装示例 portio 驱动程序时遇到问题

发布于 2024-09-02 05:11:56 字数 883 浏览 6 评论 0原文

我目前正在尝试构建一个应用程序,它将使用端口 IO 与超级 IO 芯片通信。作为其中的一部分,我正在尝试开发一个我可以联系的内核模式 Windows 驱动程序,它将为我执行 IO。因此,我下载了 Windows 驱动程序工具包 v7.1.0,内部版本 7600.16385.1,并且我正在尝试编译和安装示例 portio 驱动程序,由 WDK 提供,因为它似乎与我需要的非常接近。

我已在免费和经过检查的 x86 XP 构建环境中编译了驱动程序。这工作正常,但是当我尝试使用提供的说明安装生成的驱动程序时 - 这基本上相当于使用添加硬件向导,然后手动提供文件 - 我收到以下错误:

- 安装了以下硬件:示例 PortIO 驱动程序 (KMDF)

- 此设备的软件现已安装,但可能无法正常工作

- Windows 无法加载此硬件的驱动程序。驱动程序可能已损坏或丢失。 (代码 39)

所以,我看到两种解释:损坏或丢失。据我所知,缺少告诉,考虑到我的环境变量和.inf 文件,意味着生成的 .sys 文件不在 c:\windows\system32\drivers 中,但当我查看那里时,该文件就在那里。

所以这意味着该文件已损坏。鉴于我没有接触过驱动程序代码,并且我发现其他人也有同样的问题,这似乎不是我的编译的问题,而是代码本身的问题,或者是机器类型和机器类型的一些常见组合的问题。代码。但我可能错了。

有人对如何解决这个问题有什么建议吗?

I am currently trying to build an application, that will talk to the super IO chip using port IO. As part of that, I am trying to develop a kernel-mode windows driver that I can contact, and which will do the IO for me. I have therefore downloaded the Windows Driver Kit v7.1.0, build 7600.16385.1, and I am trying to compile and install the sample portio driver, which is provided by WDK, since it seems to be quite close to what I need.

I have compiled the driver in both free and checked x86 XP build environments. This works fine, but when I try to install the resulting driver, using the provided instructions - which basically just amount to using the Add Hardware Wizard, and then supplying the files manually - I get the following error:

-The following hardware was installed: Sample PortIO Driver (KMDF)

-The software for this device is now installed, but may not work correctly

-Windows cannot load the driver for this hardware. The driver may be corrupted or missing. (Code 39)

So, I see two explanations: corrupted or missing. Missing, as far as I can tell, given my environment variables and .inf file, would mean that the generated .sys file is not in c:\windows\system32\drivers, but when I look there, the file is there.

So that would mean that the file is corrupted. Given that I haven't touched the driver code, and that I have found others with the same problem, it doesn't seem to be a problem with my compilation, but rather with the code itself, or some common combination of machine type and code. But I may be wrong.

Does anybody have any suggestions on how to solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒儿 2024-09-09 05:11:56

我建议启用 SetupAPI 日志记录,如 Microsoft 的以下文档中所述:
http://www.microsoft.com/whdc/archive/setupapilog.mspx

对于 Windows 7,日志文件按如下所述进行分割:
http://support.microsoft.com/kb/927521

您也许能够隔离问题以及 SetupAPI 日志中的附加信息。

I would recommend enabling SetupAPI logging as described in the following document from Microsoft:
http://www.microsoft.com/whdc/archive/setupapilog.mspx

For Windows 7, the log files are split up as described here:
http://support.microsoft.com/kb/927521

You may be able to isolate the problem with the additional information in the SetupAPI logs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文