Changeset 80981 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/win/mon
- Timestamp:
- Sep 24, 2019 3:36:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp
r80978 r80981 343 343 USBFilterSetNumExact(&DevFlt, USBFILTERIDX_PRODUCT_ID, pDevice->idProduct, true); 344 344 USBFilterSetNumExact(&DevFlt, USBFILTERIDX_DEVICE_REV, pDevice->bcdDevice, true); 345 USBFilterSetStringExact(&DevFlt, USBFILTERIDX_MANUFACTURER_STR, pDevice->szMfgName, true /*fMustBePresent*/, true /*fPurge*/); 346 USBFilterSetStringExact(&DevFlt, USBFILTERIDX_PRODUCT_STR, pDevice->szProduct, true /*fMustBePresent*/, true /*fPurge*/); 347 USBFilterSetStringExact(&DevFlt, USBFILTERIDX_SERIAL_NUMBER_STR, pDevice->szSerial, true /*fMustBePresent*/, true /*fPurge*/); 345 346 /* If we could not read a string descriptor, don't set the filter item at all. */ 347 if (pDevice->szMfgName[0]) 348 USBFilterSetStringExact(&DevFlt, USBFILTERIDX_MANUFACTURER_STR, pDevice->szMfgName, true /*fMustBePresent*/, true /*fPurge*/); 349 if (pDevice->szProduct[0]) 350 USBFilterSetStringExact(&DevFlt, USBFILTERIDX_PRODUCT_STR, pDevice->szProduct, true /*fMustBePresent*/, true /*fPurge*/); 351 if (pDevice->szSerial[0]) 352 USBFilterSetStringExact(&DevFlt, USBFILTERIDX_SERIAL_NUMBER_STR, pDevice->szSerial, true /*fMustBePresent*/, true /*fPurge*/); 348 353 349 354 /* If device descriptor had to be inferred from PnP Manager data, the class/subclass/protocol may be wrong. … … 1135 1140 USBFilterSetMustBePresent(pFilter, USBFILTERIDX_DEVICE_PROTOCOL, false); 1136 1141 1142 /* We may also be unable to read string descriptors. Often the userland can't read the 1143 * string descriptors either because the device is in a low-power state, but it can happen 1144 * that the userland gets lucky and reads the strings, but by the time we get to read them 1145 * they're inaccessible due to power management. So, don't require the strings to be present. 1146 */ 1147 USBFilterSetMustBePresent(pFilter, USBFILTERIDX_MANUFACTURER_STR, false); 1148 USBFilterSetMustBePresent(pFilter, USBFILTERIDX_PRODUCT_STR, false); 1149 USBFilterSetMustBePresent(pFilter, USBFILTERIDX_SERIAL_NUMBER_STR, false); 1150 1137 1151 uintptr_t uId = 0; 1138 1152 VBOXUSBFLT_LOCK_ACQUIRE();
Note:
See TracChangeset
for help on using the changeset viewer.