Improved code for supporting multiple Windows versions #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again, I read your comment in my previous PR #92 and supporting multiple Windows versions definitively complicates the code so it makes sense to limit the scope of the project.
Anyway, I made some improvements to the code for supporting multiple Windows versions and I guess you can merge them into the same branch as the other Windows 10 support:
multiple-windows-versions
feature flag without which the code uses the previous approach of only supporting the latest COM interfaces.interfaces.rs
(compared to the code in themain
branch).interfaces_multi.rs
which works as a drop in replacement forinterfaces.rs
when the feature flag is used.interfaces_multi.rs
reusable_com_interface
macro to easily re-use the interface definitions from a previous version, like inbuild_22631_3155.rs
comobjects.rs
or the other files uses new methods then add those to the definitions inbuild_dyn.rs
.DLL Size
I checked the size of the DLL (built in release mode) with and without the
multiple-windows-versions
feature:Tests
I also ran all the tests and they did pass on Windows 10 (well, except for the ones using features that weren't supported):