Skip to content

Conversation

@Rantanen
Copy link
Owner

In many real world COM APIs the out parameters aren't only at the end of the parameter list. In the past this meant these APIs would need to be modeled with *mut Ptrs instead of being able to use Intercom's -> ComResult<(...)> return values.

This PR allows using -> ComResult<...> while manually specifying the parameter order for the COM method. This is done with the #[com_signature(..)] attribute on the method:

#[com_interface]
trait IFoo
{
    #[com_signature(a, b, OUT[0], c, OUT[1])]
    fn method(&self, a: u32, b: u32, c: u32) -> ComResult<(u32, u32)>;
}

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.

2 participants