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

Annotate missing ComOutPtr in CompositionSwapchain and `DirectCom… #1970

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

MarijnS95
Copy link
Contributor

…position`

dcomp.h and Presentation.h are missing some _COM_Outptr_ annotations, turning these functions in windows-rs to take a meaningless *mut *mut c_void. With this annotation the functions return a generic T: Interface and automatically pass its &T::IID to the riid parameter resulting in a much more ergonomic API.

Also annotate some return-only functions with RetVal to make it easier to retrieve these objects.

…position`

`dcomp.h` and `Presentation.h` are missing some `_COM_Outptr_`
annotations, turning these functions in `windows-rs` to take a
meaningless `*mut *mut c_void`.  With this annotation the functions
return a generic `T: Interface` _and_ automatically pass its `&T::IID`
to the `riid` parameter resulting in a much more ergonomic API.

Also annotate some return-only functions with `RetVal` to make it easier
to retrieve these objects.
@mikebattista mikebattista merged commit 4a93b08 into microsoft:main Aug 27, 2024
@mikebattista
Copy link
Collaborator

Thanks!

@MarijnS95 MarijnS95 deleted the dc branch August 27, 2024 19:53
@mikebattista
Copy link
Collaborator

Thanks for the feedback. @MarijnS95 could you please file a separate PR to remove the RetVal changes?

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.

4 participants