As we all know, since Windows 2000, The development driverProgramIt must be based on WDM, but it is difficult to develop and cannot be as easy as developing user-mode applications. To improve this situation, Microsoft has launched a new driver development environment. It should be pointed out in advance that this is not a new one, but a model and encapsulation Based on WDM, which significantly reduces the development difficulty. Because:
1. Apply the object-based technology in the original general program design to driver development. Although there are object models in WDM, it is not the same as object-based technology. To implement object-based technology, Microsoft has carefully designed and encapsulated the object model. Attribute, method, event, and so on ".
2. No matter the driver in kernel mode or the driver in user mode, the same object model is used to build and carry the same base. This is based on WDF. Although WDF is already an encapsulated and defined object model, WDF is the parent object of both kernel mode and user mode. In other words, both of them are obtained by inheriting WDF, or both are derived from WDF. Compared with the kernel mode, the derived object is called the "KMD framework" or kmdf. Compared with the user mode, the derived model is called the "UMD framework" or umdf. Regardless of the mode framework, the internal encapsulation method and execution behavior are still completed using WDM.
3. More importantly, what Microsoft repeatedly shows off is that it encapsulates some common actions in the driver: plug-and-play and power management. Because most drivers need to deal with plug-and-play and power management issues, it is said that this is about thousands of linesCodeIn addition, it may not be easy to deal with a low level. In order to ensure the purpose of all, WDF simply encapsulates plug-and-play and power management into the object, making it the default (default) behavior of the object.
4. Changed the relationship between the operating system kernel and the driver. In the WDM driver, the hardware and the interaction between the driver and the operating system kernel must be processed. Now WDF separates the driver from the operating system kernel, and the interaction between the driver and the operating system is handed over to the encapsulated method (function) in the framework, in this way, developers only need to focus on hardware behavior. This not only avoids the disadvantages of both sides, but also, due to the separation of the two sides, some changes in the operating system, the hardware manufacturer's supporting driver development has great benefits.
5. Both drivers (kmdf and umdf) are built in the same environment. This environment is called wdk.
That is, the development environment of kmdf and umdf is wdk.
Windows Device kit (wdk): By integrating Test suites, DDK becomes wdk. Wdk is an integrated driver development system for the Microsoft operating system series. It combines Windows DDK and hardware compatibility test (HCT) kits (hardware compatibility testing tool), and provides a test suite for Microsoft to test the stability and reliability of Windows operating systems.
6. Although the object-based technology is encapsulated and introduced, the developed driver is not inferior in execution efficiency.