瀏覽代碼

修改bug

wugren 3 年之前
父節點
當前提交
c5771ed6ec
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hidapi/windows/hid.c

+ 2 - 2
hidapi/windows/hid.c

@@ -274,7 +274,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
 	struct hid_device_info *cur_dev = NULL;
 
 	/* Windows objects for interacting with the driver. */
-	GUID InterfaceClassGuid = {0x4d1e55b2, 0xf16f, 0x11cf, {0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30} };
+	GUID InterfaceClassGuid = { 0x28d78fad, 0x5a12, 0x11D1, { 0xae, 0x5b,  0x00,  0x00,  0xf8,  0x03,  0xa8,  0xc2 } };
 	SP_DEVINFO_DATA devinfo_data;
 	SP_DEVICE_INTERFACE_DATA device_interface_data;
 	SP_DEVICE_INTERFACE_DETAIL_DATA_A *device_interface_detail_data = NULL;
@@ -291,7 +291,7 @@ struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned shor
 	device_interface_data.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
 
 	/* Get information for all the devices belonging to the HID class. */
-	device_info_set = SetupDiGetClassDevsA(&InterfaceClassGuid, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
+	device_info_set = SetupDiGetClassDevsA(NULL, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
 
 	/* Iterate over each device in the HID class, looking for the right one. */