Windows WDF Driver Design

Source: Internet
Author: User

 

WDF model: This is the WDF model. The difference between the WDM model and the WDF model has been discussed in the Windows WDM Driver Design. We can see from this model: for applications, either the WDM driver or the WDF driver model is transparent. Likewise, for Kernel subsystems, both WDM and WDF drivers are the same. Let's take a look at the framework. For the WDF driver framework, the framework includes the object model, I/O model, PNP/power model, and the object model is used to create the WDF object, the I/O model is input and output. for WDM and WDF, Io processing is different. For WDM, the IO manager is responsible for dispatching IRPs, but for WDF, it is distributed by IRP and IO queues. For PNP power management, the framework model is basically finished for us; then, let's look at the framework objects, which is created by the object model; and Callbacks is the callback function that must be compiled for the driver: for example, read functions, write functions, and special PNP and power management functions. WDF object • about methods, properties, and events • 1) MethodsPerform actions on the object. • 2) Properties:3) Events:Are messages that indicate that something has occurred for which a driver might be required to take action. 3. WDM and WDF drivers
Wdfdriver Driver object
Wdfdevice Device object
Wdfqueue Cancel-safe queue/dispatching/serialization/auto-locking/synch with PNP
Wdfrequest IRP
Wdfinterrupt Interrupt
Wdfdpc DPC
Wdfworkitem Work Item
Wdfdmaenabler DMA adapter object
Wdfiotarget Sending I/O to another driver-iocalldriver
Wdfwaitlock Event dispatcher object-passive Level Lock
Wdfspinlock Spinlock
Wdfmemory Kernel pool-refcounted
Wdfkey Registry Access
4) Why to port a driver • Here are a few advantages of porting a driver to kmdf. • 1) kmdf drivers are simpler and easier to maintain. • 2) kmdf manages most interactions with the operating system. • 3) kmdf supports versioning and is tested for each release of the operating system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.