文件名称:KMDF-Build specification
文件大小:297KB
文件格式:DOC
更新时间:2011-07-01 05:27:18
Build KMDF
Microsoft® Windows® drivers have, for many years, been based on the Windows Driver Model (WDM). WDM drivers have a well-deserved reputation for being difficult to implement correctly, and developers face a steep learning curve when they enter the driver world. The time and effort that is required to master WDM has made it largely the domain of a relatively small group of specialists.
The Windows Driver Foundation (WDF) is designed to make drivers much easier to implement and much harder to implement incorrectly. The simpler and more robust programming model that is supported by WDF makes the transition from application developer to driver developer much easier than with WDM. In particular, WDF provides default handling for Plug and Play and power management events, which substantially reduces the size and complexity of WDF drivers compared to equivalent WDM drivers. It also largely eliminates what has historically been a significant source of driver bugs.
WDM can be used only to implement kernel-mode drivers. One of the goals for WDF is to allow a much broader range of devices to be supported by user-mode drivers. For that reason, WDF has two components: the kernel-mode driver foundation (KMDF) and the user-mode driver foundation (UMDF) for kernel-mode and user-mode drivers, respectively.
The first step in implementing a WDF driver is deciding which type of driver is better suited for your purposes. UMDF drivers cannot perform operations such as handling interrupts, performing direct memory access (DMA) operations, or using kernel-mode resources such as the nonpaged pool. Drivers that need such features must be implemented with KMDF.
If you decide to implement a KMDF driver, this white paper is meant to get you started by describing the basics of how to build, install, and debug such drivers. It is especially intended for application developers with no prior driver experience, but it should be useful to anyone who is new to KMDF.
However, before going any farther:
• If you are completely new to drivers, you should first familiarize yourself with the basics of Windows driver development. A good starting point is “Introduction to Kernel-Mode Driver Development for Application Developers” on the WHDC Web site.
• For comprehensive information about writing WDF drivers, see Developing Drivers with the Windows Driver Foundation, by Penny Orwick and Guy Smith, available at http://www.microsoft.com/MSPress/books/10512.aspx.