现代微机原理与接口技术 Windows98/2000驱动程序编写方法 (下) 杨全胜 Department of Computer Science Engineering 算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 1 Windows98/2000驱动程序编写方法 (下) 杨全胜
现代微机原理与接口技术 Driver works的使用 1)生成简单框架 程序) F Compuware SoftICE Driver Suite Driver Works Driver Wizard 編程 文档@ G多体应用 多媒体制作 VtoolsD Using Iriver Works 韩设置 附件 搜索@) 其他应用 Protel 99 帮助⑩0 联众世界 紫音输法30 Department of Computer Science Engineering 2 「计算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 2 4.Driver Works的使用 1)生成简单框架
现代微机原理与接口技术 NT/WDM Device Driver Wizard DriverWorks)-Step 1 of 11 Driver Works Welcome to You are just a few mouse clicks away from creating a device driver for Windows Nt or WDM Press Fl to get detailed help on any visible d161 Note: For Windows 9x, short project names (8 characters and less)work best 工程文 件名 Choose a Project Name and Location Project Locati 工程文 AYF\MYWDM\sample 件目录 DriverStud Wizard 2.7.0 Build562) Copyright 2002 Compuware Corporati on. All Back Next Finish Cancel Help Department of Computer science Engineering 计算机科 与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 3 工程文 件名 工程文 件目录
现代微机原理与接口技术 NT/WDM Device Driver Wizard DriverWorks)-Step 2 of 11 DriverWorks Choose one of the following as your driver TnP 选择驱 WDM Driver Select this option if your driver is for WDM (Windows Windows Driver Model)xP, Windows 2000, windows 动类型 C NT 4.0 Style Driver Select this option if your driver is for Windows Nt 4.0. Or if your driver is e softwere onl driver C Empty Driver Pr Select this option t generate an empty driver project with no source C Simple C++ Dr Select this option to generate a simple driver with C+t runtime enabled <Back Next Finish Cancel Help Department of Compute ence Engineering 4 计算机科学与 程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 4 选择驱 动类型
现代微机原理与接口技术 NT/WDM Device Driver Wizard ( DriverWorks)- Step 3 of 11 Driver Works Choose one of the following as your WDM WIndows Driver Model) driver type WDM Functi on Driver Select this option if your driver is to control a hardware G WDM Filter Driver Select this option if your driver is to filter another wnM 创建功能驱 动程序 创建过滤器 驱动程序 Back Rext Finish Cancel Help Department of Computer Sclc Engineering 计算机科学与工程系 http://qsyangyeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 5 创建功能驱 动程序 创建过滤器 驱动程序
现代微机原理与接口技术 T/WDM Device Driver Wizard DriverWorks)-Step 4 of 11 × If your driver controls a hardware device, select the appropriate bus 本例不驱 Select hardware Bus 动硬件 None- driver does not control h C ISA C PCMCIA C PCI C PNPIsa 选择相 C USB CWDM only) C 1394 (WDM only) 应总线 Not used Not used Not used Not used <Back Finish Cancel Help Department of Computer Science Engineering 算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 6 选择相 应总线 本例不驱 动硬件
现代微机原理与接口技术 WDM Device Driver Wizard DriverWorks)- Step 5 of 11 Driver Works The next few steps will ask you some questions abou your driver class The WDm device driver create the DriverWizard has a single"driver class a slngle evl ce class. Drivers for NT 4.0 and earlier may have 驱动类 名称 Driver Class This is the name of the ctt class used to implement your 驱动类 File rame This is the file Sample name used for the 文件名 driver class Usually, the defaults shown here do not need to be <Back Next Finish Cancel Help Department of Computer Science Engineering 7 算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 7 驱动类 名称 驱动类 文件名
现代微机原理与接口技术 NT/WDM Device Driver Wizard DriverWorks)- Step 6 of 1 Driver Works Select the types of requests that your driver will Read Handle read requests from applications Rite Handle write requests from Flush Handle flush I/0 buffer requests v Device Contro Handle Device io Control messages from applications 选择需要 Internal Device Con Handle Device IO Control messages from other drivers 处理的消 e an Handle cleanup notifications 息句柄 Shut down WDM dr ivers use PNP instead of vlUnload WDM drivers are always unloadable Finish Cancel Hel Department of Computer Science Engineering 算机科学与工程系 http://qsyang.yeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 8 选择需要 处理的消 息句柄
现代微机原理与接口技术 WDM Device Driver Wizard ( DriverWorks)- Step 7 of 11 Driver Works Select queueing method Most hardware devices can only process one I/0 request at a time. Low-level drivers usually use one or more queues to serialize requests Driver managed queues provide the best L:1 None requests are not queued DriverManaged-one or more StartIo style qu SystemManaged single system"provi ded Start. Whi ch functions are serialized? Some requests can be handled immedi ately, while others must be handled one at a time ially) Serialize all Read requests y Serialize all Write requests Serialize all Flush Buffer reque <Back Next Finish Cancel Help Department of Computer Science Engineering 计算机科学与工程 http://qsyangyeah.net
http://qsyang.yeah.net 现代微机原理与接口技术 9
现代微机原理与接口技术 NT/WDM Device Driver Wizard DriverWorks)- Step 8 of 11 X Identify parameters to be loaded from the registry DriverWorks when the DRIVER start Name in Reg var Name Type Default BreakdDnEntry m bBreak BOOLEAN FALSE Add Edit Delete Back dext+Finish_canl」」Ma Department of Computer Science Engineering 10 算机科学与工程系 hte:/gsyangyeahnet
http://qsyang.yeah.net 现代微机原理与接口技术 10