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;