On Thu Apr 9 15:05:00 2026 +0000, Rémi Bernon wrote:
Right okay, I got a bit confused and assumed instance meant a particular device path. Let me look at it again with that in mind. Reading it again, although I was confused about the instance/device mapping, I still think that what I suggested applies.
Right now you first read only the last known valid (ie: with DevicePath) entries from the registry to a local working copy, then enumerate physical devices to find out actual valid and invalid devices, and if that doesn't match the registry you then need to delete DevicePath properties from existing entries, and/or iterate the registry again to eventually find out entries to reuse (optionally generate GUIDs for them) or to decide whether to create new ones. This feels like it could be made simpler by working completely locally. Just read all the registry entries in the local working copy, filter valid/invalid ones there by matching / clearing their device path. Use it to find free ones or add new ones if needed, and then write it all back to the registry. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10364#note_135939