Platform SDK: Hardware

Device Notifications

The system broadcasts device change events to all applications and services. To specify which events your application or service should receive, use the RegisterDeviceNotification function.

When an application or service calls RegisterDeviceNotification, it also specifies the window that will receive the notification events. Services can specify a service status handle instead of a window handle. If a service specifies its service status handle, its service control handler will receive the notification events. For more information, see HandlerEx.

Device notification handles returned by RegisterDeviceNotification must be closed by calling the UnregisterDeviceNotification function when they are no longer needed.