The class drivers must connect their class service to a device before the device can be opened. The class drivers connect their class service after they attach a class DO to a device stack. The function driver uses the class service callback to transfer input data from a device to the class data queue for the device. The function driver's ISR dispatch completion routine for a device calls the class service callback. Kbdclass provides the class service callback KeyboardClassServiceCallback, and Mouclass provides the class service callback MouseClassServiceCallback.
A vendor can modify the operation of a class service callback by installing an upper-level filter driver for a device. The sample filter driver Kbfiltr defines the KbFilter_ServiceCallback callback, and the sample filter driver Moufiltr defines the MouFilter_ServiceCallback callback. The sample filter service callbacks can be configured to modify the input data that is transferred from the port input buffer for a device to the class data queue. For example, the filter service callback can delete, transform, or insert data.
The class and filter service callbacks are connected in the following way:
The class and filter service callbacks are called in the following way: