Closed Lej77 closed 7 months ago
This is very cool PR, but I don't see the need for this in the DLL at least. In Rust side I see why this could be useful if there is an app that targets both, however I can't maintain the 10 support.
If someone needs Windows 10 support for the DLL specifically they can easily load older DLL based on the Windows version, it doesn't have all the same whistles and bells, but supporting Windows 10 indefinitely in the main code base seems too hard for me.
The same problem applies to all the different Windows 11 versions, there is already a bunch that are incompatible.
If someone really wanted to support all those they could do something like:
if Windows10 {
LoadLibrary older version
} elseif Windows 11 old version {
LoadLibrary
} else ...
I merged this to a feature branch, even though I don't plan to maintain this at the moment, it's good to have it in the branch.
This PR detects the Windows build version at runtime and selects different COM interfaces based on it. This allows us to support both Windows 10 and Windows 11 at the same time.
I have not tested this thoroughly so there might be bugs but it seems to work on Windows 10. I don't have Windows 11 so don't know if it works there but I think it should.