第一章概述...........................................................................................................................6
1.1 本教程的规划:...............................................................................................................6
第二章WDM驱动程序的运行.................................................................................................7
2.1 WDM驱动程序的基本调用流程:.....................................................................................7
2.1.1驱动程序何时从何处开始执行?........................................................................7
2.1.1.1第一次安装好驱动程序:................................................................7
2.1.1.2驱动程序正常运行:........................................................................7
2.1.2 DriverEntry()大约做些什么?.........................................................................7
2.1.2.1 IRP主功能码(Major Function Code).......................................9
2.1.2.2 IRP_MJ_PNP次功能码(Minor Function Code).......................10
2.1.2.3 IRP_MJ_POWER次功能码(Minor Function Code)...................10
2.1.3驱动程序与应用程序相关的功能码如何调用?..............................................10
2.1.3.1 DriverEntry()中您必须要注册回调函数...................................10
2.1.3.2 在您的应用程序中正确调用CreateFile().............................11
2.1.3.3 应用层调用驱动的消息参照:.....................................................11
2.1.3.4 IoControl调用:...........................................................................11
第三章开始编写WDM驱动程序...........................................................................................13
3.1 得到一个Demo工程:.....................................................................................................13
3.2 在VC下配置DDK的开发环境...........................................................................................15
3.2.1 我的目录.............................................................................................15
3.2.1.1我们应该在系统环境变量里设置..................................................15
3.2.2安装VC6................................................................................................17
3.2.3 打开wdm1\sys\Wdm1.dsp工作区文件...............................................18
3.2.4 修改H:\driverDev\MakeDrvr.bat文件...........................................18
3.2.5 设置VC的环境.....................................................................................19
3.2.5.1前面的内容编译时出了错误(配置'MakeDrvr')......................19
3.2.5.1.1 在project -> settings中设置成如下:.......................19
3.2.5.1.2 还可以在Tools-> Options-〉directories中选择“Executable files”并添加MakeDrvr.bat的目录即可.................20
3.2.5.1.3 再按F7编译 有编译提示..................................................20
3.2.5.1.4 搞清楚 MakeDrvr.BAT文件的功能...................................21
3.2.5.2前面的内容编译时出了错误,让我们看看是什么原因..............22
第四章 安装DebugPrintMonitor驱动程序.................................................................................24
4.1 用控制面板安装DebugPrintMonitor...........................................................................24
4.2 检查DebugPrint driver的安装情况...........................................................................29
第五章 安装wdm1驱动程序..........................................................................................................30
5.1 INF 文件.........................................................................................................................30
5.1 全新安装驱动.................................................................................................................30
5.1.1 安装驱动WDM1.SYS.............................................................................................30
5.2 测试DebugPrintMonitor...............................................................................................30
1