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

Support more parameter types in COM interface declarations #1554

Closed
Herschel opened this issue Feb 19, 2022 · 4 comments
Closed

Support more parameter types in COM interface declarations #1554

Herschel opened this issue Feb 19, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Herschel
Copy link

Herschel commented Feb 19, 2022

Motivation

COM interface declaration support was initially added in #1540. Currently it only supports parameters of pointer type which can be passed through the FFI boundary.

For example, the following fails:

#[interface("00000000-0000-0000-0000-000000000000")]
unsafe trait ITest: IUnknown {
    fn SetFoo(&self, i: i32) -> HRESULT;
}

This should support more parameter types, including primitive types and common Windows API types which can also be passed through based on something like AbiTransferable in com-rs.

(Naturally this is all a very recent addition, still under development and not expected to be working yet -- submitting this for tracking purposes. Thank you!)

@Herschel Herschel added the enhancement New feature or request label Feb 19, 2022
@kennykerr
Copy link
Collaborator

kennykerr commented Feb 19, 2022

Yep, that was only the start. I hope to support the same type-system as the rest of the windows crate supports.

Starting to work on this now.

@kennykerr
Copy link
Collaborator

kennykerr commented Feb 25, 2022

Tracking this here: #1486

@Herschel
Copy link
Author

Herschel commented Mar 3, 2022

#1486 was re-opened, so closing this in favor of that issue. Thank you for the efforts!

@Herschel Herschel closed this as completed Mar 3, 2022
@kennykerr
Copy link
Collaborator

Improvements to the interface macro are now published as part of 0.34.0.

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

No branches or pull requests

2 participants