c++ - 在哪里可以找到带有源代码的简约 WDM 驱动程序模板?

标签 c++ visual-c++ driver wdk wdm

<分区>

我遇到内核模式驱动程序的经验很少。这是我正在尝试做的事情:

  • 拥有加载驱动程序的用户模式应用程序。
  • 让用户模式应用程序写入它,以便向它发送指令。
  • 让驱动程序将 RDMSR 指令发送到 Intel 芯片。
  • 将结果返回给用户模式应用程序。

我读过 this article描述了可以实现此行为的不同方式(缓冲 I/O、直接 I/O 或两者都不是)。

我的问题是……这篇文章中的代码代表了构建 WDM 驱动程序的方式,我希望能够使用 Windows 创建并修改其中包含源代码的默认 WDM 项目模板Driver Kit,但是当我下载Windows Driver Kit (WDK)时,唯一的WDM驱动模板是一片空白,没有任何源代码。

我在哪里可以找到一个极简 WDM 驱动程序模板的示例,其中包含使用 IoCreateDevice 的源代码创 build 备对象?

最佳答案

我找到了 here . Windows Driver Kit 8.1 Samples的一部分, 光荣的 IOCTL 驱动程序示例

demonstrates the usage of four different types of IOCTLs (METHOD_IN_DIRECT, METHOD_OUT_DIRECT, METHOD_NEITHER, and METHOD_BUFFERED)

此外,

This sample driver is not a Plug and Play driver. This is a minimal driver meant to demonstrate a feature of the operating system. Neither this driver nor its sample programs are intended for use in a production environment. Instead, they are intended for educational purposes and as a skeleton driver.

关于c++ - 在哪里可以找到带有源代码的简约 WDM 驱动程序模板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24017717/

相关文章:

c - Windows过滤器驱动上的32位_asm代码到64位汇编代码

使用 vector/初始化列表的任何类型的 C++11 动态多维数组

c++ - 路径规划——多个目的地

java - 审计 JBossAS5 上的 JDBC 执行

linux - 安装 amd_catalyst-13.12 驱动程序时出错

c++ - 在编译指向可能抛出的函数的非抛出指向时,gcc 有什么问题吗?

c++ - 为什么我必须在 "original"指针上调用 delete?

c++ - int* a = nullptr; 和有什么区别?和 int *a = nullptr?

C++ unsigned long 在 4294967295 之后不回绕

visual-studio - 在 Visual Studio 的 VC++ 项目中,如何指定/导出符号?