Windows provides an infrastructure for the hardware-agnostic support of notification components such as LEDs and vibration mechanisms. This support is delivered through the introduction of a Kernel-Mode Driver Framework (KMDF) class extension specifically for hardware notification components that allows for the rapid development of client drivers. A KMDF class extension is essentially a KMDF driver that provides a defined set of functionality for a given class of devices, similar to a port driver in the Windows Driver Model (WDM). This section provides an overview of the architecture of the hardware notification class extension.
For additional information about the KMDF, see Using WDF to Develop a Driver.
To provide support for hardware notifications, you need:
|HWN_CLX_EXPORT_INDEX||Defines the position for each of the Hardware Notification exports in the export table.|
|HWN_CLIENT_GET_STATE||Implemented by the client driver to get hardware notification component state. It is invoked when a user requests status information.|
|HWN_CLIENT_INITIALIZE_DEVICE||Implemented by the client driver and is invoked as a result of a call to EVT_WDF_DEVICE_PREPARE_HARDWARE.|
|HWN_CLIENT_QUERY_DEVICE_INFORMATION||Implemented by the client driver to retrieve hardware notification component attributes.|
|HWN_CLIENT_SET_STATE||Implemented by the client driver to set hardware notification component state. It is invoked when a user wants to change the state of a driver.|
|HWN_CLIENT_START_DEVICE||Implemented by the client driver to start the hardware notification component. It is invoked as a result of a call to EVT_WDF_DEVICE_D0_ENTRY.|
|HWN_CLIENT_STOP_DEVICE||Implemented by the client driver TO start the hardware notification component. It is invoked as a result of a call to EVT_WDF_DEVICE_D0_EXIT.|
|HWN_CLIENT_UNINITIALIZE_DEVICE||Implemented by the client driver and invoked as invoked as a result of a call to EVT_WDF_DEVICE_RELEASE_HARDWARE. This callback function uninitializes the hardware notification component.|
|HwNProcessAddDevicePostDeviceCreate||Creates I/O queues. It should be called after the client driver’s EVT_WDF_DRIVER_DEVICE_ADD callback function is invoked and the device object has been created.|
|HwNProcessAddDevicePreDeviceCreate||Supplies the device prepare/release and entry/exit callbacks to the Windows Driver Foundation (WDF) for transitioning the device into different states.|
|HwNRegisterClient||Registers the hardware notification client driver and its callback functions with the class extension.|
|HwNUnregisterClient||Unregisters the hardware notification client driver and its callback functions with the class extension. This function should be invoked when the client driver is unloaded.|
|CLIENT_DEVICE_INFORMATION||The CLIENT_DEVICE_INFORMATION structure is used by the hardware notification callback HWN_CLIENT_QUERY_DEVICE_INFORMATION to return the total number of hardware notifications that the client device driver provides.|
|HWN_CLIENT_REGISTRATION_PACKET||Hardware Notification client driver registration packet that is passed to the class extension when a client driver is registered. Contains version information and client driver callback functions.|
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.