I have a fairly simple C++ program that turns on a blink(1) based on a capture device's mute state.
I'd love to port that code to Rust, if possible, but I don't know how to implement the IMMNotificationClient or IAudioEndpointVolumeCallback interfaces.
I noticed that there is the implement macro, but the documentation seems a bit sparse. If there is an example of how to do this, could you point me toward it, and if not, I humbly request one!
The implement macro currently only supports WinRT interfaces, but I am working on adding support for COM interfaces like IAudioEndpointVolumeCallback and should be coming soon.
Thanks for working on this, I need to be able to implement DirectShow filters 馃槄
I'm also affected by this, in the meantime, is there some way to implement interfaces by hand?
Implementing COM interfaces from scratch is non-trivial but very much possible. It does take quite a bit of knowledge of how COM works under the hood though. You can have a look at https://github.com/microsoft/com-rs (specifically the code gen aspects of that crate) for some clues.
Duplicate of #81 - working on it.
I'm also affected by this, in the meantime, is there some way to implement interfaces by hand?
Here's an example of implementing drag&drop com interfaces by hand. It is doable but less than ideal. A macro would be very welcome indeed :)
That's all I am working on at the moment. 馃槈
Most helpful comment
The
implementmacro currently only supports WinRT interfaces, but I am working on adding support for COM interfaces likeIAudioEndpointVolumeCallbackand should be coming soon.