Differences between WDM and wdf usb Drivers

Source: Internet
Author: User

 

1) DDK and wdk

 

DDK is based on the WDM driver model, while wdk is based on the WDF driver model. The biggest difference between the WDM Driver Model and the WDF driver model is:

1) the WDF driver framework encapsulates WDM once. The WDF framework is like the base class in C ++, and the model, Io model, PNP, and power management model in this base class; some Operating System-related processing functions are provided. These functions are like virtual functions in C ++. These functions can be override in the WDF driver, especially for PNP management and power management! Basically, the WDF framework is used, and the WDF function-driven almost never performs special processing on it;

 

2) Another major difference between the WDF Driver Model and the WDM driver model is:

 

The WDF driver uses a queue for Io processing, while all Io operations are processed using the default queue in WDM. If IRP synchronization is required, startio must be used;

 

3) WDF is object-oriented, while WDM is process-oriented. WDF provides object encapsulation, such as encapsulating IRPs into wdfrequest. The object provides methods and events.

 

 

5) read/write of USB devices;

When the application uses readfile or writefile for read/write

Usbbuildinterruptorbulktransferrequest constructs urb requests and sends them to the underlying USB bus driver through iocalldriver;

 

For WDF, wdfusbtargetpipeformatrequestforread formats the Read Request and sends it to the underlying USB bus driver using wdfrequestsend;

 

You can set a routine for both USB reading and writing of WDM and WDF;

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.