Rémi Bernon (@rbernon) commented about dlls/windows.devices.bluetooth/bluetoothdevice.c:
IBluetoothDeviceStatics_AddRef(( *out = &impl->IBluetoothDeviceStatics_iface )); return S_OK; }
- if (IsEqualGUID( iid, &IID_IBluetoothLEDeviceStatics ))
- {
IBluetoothLEDeviceStatics_AddRef(( *out = &impl->IBluetoothLEDeviceStatics_iface ));
return S_OK;
- }
It's maybe not a huge problem for this static factory, but unless the object are really supposed to implement both interfaces, which tests should attest, I think it'd be better to keep them separate objects. The same is true for the devices for which I assume you want to share the implementation.
You could have an internal abstraction for bluetooth devices, or implement one on top of the other, or optional vtable pointers with each kind of devices created with one or the other iface, as long as it doesn't leak such implementation details to the application.