(C) the difference between windows xp with DDK WDK WDM-driven development of

Transfer: http://www.cnblogs.com/hyddd/archive/2009/03/15/1412684.html 

Recently try to understand driven development under WINDOWS, now summarize the data seen recently.

  1. First, start with basic things to start, WINDOWS driver under development, the need for a special development package, such as: the development of JAVA program, we may need a JDK, to develop applications WINDOWS, WINDOWS we need the SDK, and now drivers under development WINDOWS, we need a DDK / WDK.

  2.DDK (Driver Developer Kit) and WDK (Windows Driver Kit) difference:

  The drive to talk about some relevant history:

  1) .95 / 98 / ME, drive model: Vxd, relevant information can be seen "programming master motto" a few chapters ago, there are very detailed introduction, although this thing is outdated, but probably still look informative.

  2) .2000 / XP / 2003 under, Windows uses WDM driver model (Windows Driver Model), developed 2000 / XP / 2003 driver development kit: DDK.

            WDM driver is nothing more than Microsoft was expanded over NT drive, the filter driver is no exception.

  3) .Vista and later, using the WDF driver model (Windows Driver Foudation), corresponding development kits: WDK.

In fact WDK can be seen as an upgraded version of the DDK, now generally DDK WDK-related functions previously included, now under XP can also be driven by the development of WDK, WDK can compile a variety of driving 2000-2008.

  3.Vxd drive file extension: .vxd.

     WDM and WDF driver file extension: .sys.

        4, WDM is a Win32 device driver architecture.

            Windows device drivers, past WDM (Windows Driver Model) framework, the complexity of programming for beginners difficult to grasp its programming essentials. To solve this problem, Microsoft WDM driver architecture improvements have been made to form a new WDF (Windows Driver Foundation) framework . It offers driver development framework for object-oriented and event-driven, greatly reducing the development effort. From now on, master Windows device driver developers, from the previous "professional" who will become "normal" public.
 WDF driver includes two types, a kernel-level, called KMDF (Kernel-Mode Driver Framework) , the SYS files; the other is the user level, referred UMDF (User-Mode Driver Framework) , the DLL file .

5、

ddk and wdk

ddk is based on the wdm driver model, and wdk WDF driver model is based , the biggest difference wdm driver model and wdf drive model are:

. 1) WDF drive frame for WDM conducted a package , the WDF frame just like in C ++ base class, and this base class model, IO model, pnp and power management model; and provides some of the processing associated with the operating system functions, these functions seem to C ++ virtual functions, as these functions can be performed override WDF driver; Pnp particular management and power management! WDF framework substantially made by, but not nearly driving function WDF special handling it;

2) Another major difference between the model and the WDM driver WDF driver model are:

WDF drive using IO processing queue, while in the WDM all IO operations are handled by default queue, if you want to synchronize IRP, must StartIo ;

3) WDF object-oriented, procedure-oriented and WDM, the WDF object is to provide a package, as will provide a method and encapsulated into WDFREQUEST Event IRP, objects.

5) write usb device;

When using an application to read and write ReadFile or WriteFile, first

UsbBuildInterruptOrBulkTransferRequest constructs urb request, and then sent to the bottom by the IoCallDriver usb bus driver;

For WDF is, WdfUsbTargetPipeFormatRequestForRead read request is formatted and sent to the bottom Usb WdfRequestSend to use bus driver;

Reading and writing of WDM and WDF usb routine is completed can be set;

Guess you like

Origin www.cnblogs.com/hjbf/p/12128249.html