- The Skeleton Driver
- Skeleton Driver Classes, Objects, and Interfaces
- Using the Skeleton Driver as a Basis for Development
- Customize the Exports and Sources Files
- Customize the INX and Comsup.cpp Files
- Add Device-Specific Code to Driver.cpp and Device.cpp
Skeleton Driver Classes, Objects, and Interfaces
The Skeleton driver implements the four classes that are listed in Table 2.
Table 2
Class Name |
Description |
Public Interfaces |
CUnknown |
Base class from which others derive |
IUnknown |
CClassFactory |
Class factory that instantiates the driver class |
IClassFactory |
CMyDriver |
Driver callback object class |
IDriverEntry |
IUnknown |
|
|
CMyDevice |
Device callback object |
IUnknown |
Figure 1 shows how the objects that are instantiated from these classes interact with the corresponding framework objects.
Figure 1 Interaction of Framework and Skeleton objects (Click to enlarge)
As Figure 1 shows, the framework implements a driver object and a device object. The framework’s driver object uses the IDriverEntry interface on the Skeleton driver’s CMyDriver object, and the CMyDriver object, in turn, uses the IWdfDriver interface on the framework’s driver object. The framework’s device object exposes the IWdfDevice and IWdfDeviceInitialze interfaces, which the driver’s CMyDevice object uses. The Skeleton drivers’s CMyDevice class does not implement additional interfaces because it does not support hardware or handle I/O requests. The device object in a typical driver would implement additional interfaces for Plug and Play notifications, I/O requests, I/O queues, and so forth.