DRIVER CLASSES
Besides implementing the stream interface, a driver may implement a specific set of IOCTLs. In reality, most functionality is implemented by this “backdoor” because it enables far greater flexibility than the read-and-write driver functions. For example, drivers that implement power management implement a standard set of IOCTLs. Drivers that implement serial devices also implement a standard set of IOCTLs.
Many drivers implement an alternative interface by implementing a specific set of IOCTLs. Compact 7 formalizes this by specifying a number of predefined interfaces, as shown in Table 32-4. Devices that implement the IOCTLs for an interface belong to the associated class. This can be indicated by adding a class GUID entry into a driver’s registry settings as a subkey IClass, or the Device Manager function AdvertiseInterface can be used. Custom interfaces classes can also be defined. If a driver implements the interface for a driver class though, then it must fully implement the functionality because system components that use it assume that the functions are fully executed.
INTERFACE |
BATTERY_DRIVER_CLASS |
BLOCK_DRIVER_GUID |
CDDA_MOUNT_GUID |
CDFS_MOUNT_GUID |
DEVCLASS_CARDSERV_GUID |
DEVCLASS_DISPLAY_GUID |
DEVCLASS_KEYBOARD_GUID |
DEVCLASS_STREAM_GUID |
FATFS_MOUNT_GUID |
FSD_MOUNT_GUID |
NLED_DRIVER_CLASS |
PMCLASS_BLOCK_DEVICE |
PMCLASS_DISPLAY |
PMCLASS_GENERIC_DEVICE |
PMCLASS_NDIS_MINIPORT |
STORE_MOUNT_GUID ... |
Get Professional Windows® Embedded Compact 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.