现代微机原理与接口技术 New Wo Inf Click the OK button to have the wizard generate a workspace with the following specifications After pressing OK, you should Build the skeleton driver: Build Build sample. sys Search for the string "TODO" and review the suggesti ons Review the default registry settings Sample. inf The wizard will create the following files readme. txt Contains information shown here ASample.rc Shell for resource file (used for event messages version resource) sample. dsw DevStudio workspace file sys\functionh Used by DriverWorks library to determine which Workspace D: YF\MYWDM\sample Cancel Department of Computer scie Engineering 16 计算机科学与工程系 http://qsyangyeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 16
现代微机原理与接口技术 The wizard he as successfully created your driver project Do you want to open the workspace D: \YF\MYWDM\sample\sample. dsw with Microsoft Visual Studio? ①否」 Department of Computer Science Engineering 算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 17
就件 看 工程编译工具 DriverStudi。盘口耜助 阐标准|,l -aJx Sample | class members‖● DriverEntry ·氐囹凹!回属v刊曾"昌 ax//Sample.cpp 日 FP sample classes +L Sample verwizard version Driver studio 2.7.0(Build 562) 驱动类 -口G|obas 日 Test sample classes <udw. h> 口G|obal 设备类 e.pch") // Generated by DriverWizard version Driverstudio 2.7.0(Build 562) // Set a default 32-bit tag value to be stored with each heap block allocated by operator new. Use Boundschecker to view the memory pool This value can be overridden using the global function SetPoolTag( POOLTAG DefaultPoolTag( pmas); // Create the global driver trace object TODO: Use KDebugOnlyTrace if you want trace messages to appear only in debug builds. Use KTrace if you want tr // Begin INIT section Cas:.Reso.」自 Filevi e(C) Compuware Technologies, 1996-2001 1 MODULE*.\objchk\i386\sanple.sys PROMPT=OFF Softice is not active Translation of D: \YF\MYWDM\sample\sys\objchk\1386\sample. sys successfully completed g error(s nin 编译人调试入查找支 找文作2入结果 SQL Debuggir Ready
http://qsyang.yeah.net 现代微机原理与接口技术 18 驱动类 设备类
文件编辑查看插入工程遍译工具 DriverStudio窗口帮助 阐标准圉 的回日息吗园冒% TL_CODE2 Win32 Checked%%为 ample Device Dri ri v[All cla ss members◆ Startle 兴·凹!们"邕 eax / SampleDevice cpp Ls Workspace'sample: 2 project(s) // Implementation of SampleDevice device class 白 sample files sion Driver Studio 2.7.0(Build 562) Ba Source Files . Sample. cpp 驱动类文件 rks classes 曲 SampleDevice. c 日 Header Files TalmUlGureH40o5// Allow switch statement with no cases 目fu 目 Sample. h 自 SampleDevice h 设备类文件 e. h a Sample DeviceInterface. h 目 sampleioctl!hl 中 Resource files Include". \sampleioctlh" 自 readme. txt pragma hdrstop( Sample.pch") 口 External ndencies 白 Test sample extern ktrace t. //Global driver trace object openLy 目 readme. txt SampleDevice CLASS GUID B Sample DeviceInterface 自 sampleioctl h 驱动安装 2 Test sample. cp 指导文件 nstructor for the Functional Device object, or FDO hich builds in automatic esoU E() Compuware 测试用的控制 1ODULE-\ob jchk\1386\sanp l softice is not active 台程序文件 Translation of D: \YF\MYWDM\sample\ completed 编③""置量存2猜果入时日 Ready
http://qsyang.yeah.net 现代微机原理与接口技术 19 驱动类文件 设备类文件 测试用的控制 台程序文件 驱动安装 指导文件
现代微机原理与接口技术 此时已经具备了一个驱动程序以及做测试 用的应用程序的基本框架,我们可以在VC集 成环境下修改有关程序,增加相关的具体操 作代码,然后就可以编译和调试了 Department of Computer Science Engineering 算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 20 此时已经具备了一个驱动程序以及做测试 用的应用程序的基本框架,我们可以在VC集 成环境下修改有关程序,增加相关的具体操 作代码,然后就可以编译和调试了