Rémi Bernon (@rbernon) commented about dlls/windows.devices.bluetooth/bluetoothadapter.c:
while (SetupDiEnumDeviceInterfaces( devinfo, NULL, &GUID_BLUETOOTH_RADIO_INTERFACE, idx++, &iface_data )) { IBluetoothAdapter *adapter = NULL; + DWORD path_size;
- if (!SetupDiGetDeviceInterfaceDetailW( devinfo, &iface_data, iface_detail, sizeof( buffer ), NULL, NULL )) + if (!SetupDiGetDeviceInterfaceDetailW( devinfo, &iface_data, iface_detail, sizeof( buffer ), &path_size, NULL )) continue;
+ if (adapter_id) + { + path_size -= (offsetof( SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath ) + sizeof( WCHAR )); + if (adapter_id_size != path_size || memcmp( iface_detail->DevicePath, adapter_id, path_size )) continue; + }
Is this compatible with native device ids? Shouldn't we compare it case-insensitively? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10006#note_128527