在哪里可以找到一个带有源代码的简约WDM驱动程序模板? [英] Where can I find a minimalistic WDM driver template with source code in it?

查看:190
本文介绍了在哪里可以找到一个带有源代码的简约WDM驱动程序模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了很少的经验的内核模式驱动程序。这里是我想做的:

I came across kernel-mode drivers with very little experience. Here's what I am trying to do:


  • 有一个用户模式应用程序加载驱动程序。

  • <
  • 让驱动程序将RDMSR指令发送到Intel芯片。

  • 将结果返回到用户模式应用程序。

  • Have a user-mode application that loads the driver.
  • Have the user-mode application write to it, in order to send it an instruction.
  • Have the driver send the RDMSR instruction to the Intel chip.
  • Return the results back to the user-mode application.

我阅读了本文介绍了您可以实现此行为的不同方式(缓冲I / O,直接I / O或两者)。

I've read this article that describes the different ways in which you can accomplish this behavior (Buffered I/O, Direct I/O, or Neither).

我的问题是这个...文章有代码,代表你的WDM驱动程序的结构,我期待能够使用Windows驱动程序工具包创建并修改默认WDM项目模板,但是当我下载Windows驱动程序工具包(WDK)时,唯一的WDM驱动程序模板是完全空白的,没有有任何源代码。

My problem is this...the article has code that represents the way you would structure a WDM driver, and I was expecting to be able to create and then modify a default WDM project template with source code in it using the Windows Driver Kit, but when I downloaded the Windows Driver Kit (WDK), the only WDM driver template was completely blank and did not have any source code.

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

Where can I find an example of a minimalistic WDM driver template with source code in it that uses IoCreateDevice to create a device object?

推荐答案

我发现它这里。作为 Windows驱动程序工具包8.1示例的一部分,光荣的IOCTL驱动程序示例

I found it here. Part of the Windows Driver Kit 8.1 Samples, the glorious IOCTL driver sample


演示了使用四种不同类型的IOCTLs
(METHOD_IN_DIRECT,METHOD_OUT_DIRECT,METHOD_NEITHER和
METHOD_BUFFERED)

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.

这篇关于在哪里可以找到一个带有源代码的简约WDM驱动程序模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆