|
|
@@ -344,6 +344,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
|
|
|
|
|
/* Make sure this device is of Setup Class "HIDClass" and has a
|
|
|
driver bound to it. */
|
|
|
+ char driverkey[1024];
|
|
|
for (i = 0; ; i++) {
|
|
|
char driver_name[256];
|
|
|
|
|
|
@@ -354,6 +355,11 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
|
|
|
goto cont;
|
|
|
|
|
|
res = SetupDiGetDeviceRegistryPropertyA(device_info_set, &devinfo_data,
|
|
|
+ SPDRP_HARDWAREID, NULL, (PBYTE)driverkey, sizeof(driverkey), NULL);
|
|
|
+ if (!res)
|
|
|
+ goto cont;
|
|
|
+
|
|
|
+ res = SetupDiGetDeviceRegistryPropertyA(device_info_set, &devinfo_data,
|
|
|
SPDRP_CLASS, NULL, (PBYTE)driver_name, sizeof(driver_name), NULL);
|
|
|
if (!res)
|
|
|
goto cont;
|