English
Language : 

AN496 Datasheet, PDF (34/36 Pages) Silicon Laboratories – HID USB-TO-SMBUS API SPECIFICATION
AN496
7. Surprise Removal (For Windows)
HidSmbus_GetHidGuid() returns the HID GUID so that Windows applications or services can register for the
WM_DEVICECHANGE Windows message. Once registered, the application will receive device arrival and
removal notices for HID devices. The application must retrieve the device path to filter devices based on VID/PID.
Similarly, if a DBT_DEVICEREMOVECOMPLETE message is received, the application must check to see if the
device path matches the device path of any connected devices. If this is the case, then the device was removed
and the application must close the device. Also, if a DBT_DEVICEARRIVAL message is received, the application
might add the new device to a device list so that users can select any HID device matching the required VID/PID.
See accompanying example code for information on how to implement surprise removal and device arrival. Search
for Knowledge Base Article # 222649, 311158, and 311153 for programming examples for C++, Visual Basic .NET,
and Visual C#.
34
Rev. 0.2