Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft support for VARIANT and PROPVARIANT #2780

Closed
wants to merge 2 commits into from
Closed

Draft support for VARIANT and PROPVARIANT #2780

wants to merge 2 commits into from

Conversation

kennykerr
Copy link
Collaborator

Hey folks, finally spending some time on VARIANT and PROPVARIANT. This is not quite done but do give me some feedback on the shape of things. Does this seem useful? Exhaustive coverage of the variant types may not be practical, but would this still be useful with partial support?

Fixes: #539

@kennykerr kennykerr mentioned this pull request Jan 9, 2024
@mwcampbell
Copy link

To replace AccessKit's current code for constructing VARIANTs, this would also need to support VT_UNKNOWN. I suppose the next step is to make the generated bindings use the new VARIANT wrapper rather than the raw struct, making sure to get ownership transfer right, particularly when a method in a user-implemented interface returns a VARIANT, as with IRawElementProviderSimple::GetPropertyValue which AccessKit implements.

@mwcampbell
Copy link

I forgot to say, thanks for this and for all your work on windows-rs. I have no immediate need for this, as I already wrote the ugly code to create VARIANTs in AccessKit, but I'm happy to see safe and convenient support for more aspects of the Windows API.

@kennykerr
Copy link
Collaborator Author

kennykerr commented Jan 9, 2024

Thanks Matt, yes VT_UNKNOWN support is on my list.

@kennykerr
Copy link
Collaborator Author

Final PR coming soon.

@kennykerr kennykerr closed this Jan 10, 2024
@kennykerr
Copy link
Collaborator Author

Final PR is here: #2786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify use of VARIANT
2 participants