Rust traits are not binary-compatible with C++ vtables, so no, you cannot
use them directly.

I think it's possible to implement COM interop by doing some clever code
generation via macros. I briefly looked into doing this a couple of months
ago, but at the time it was not possible to specify calling convention on
function pointers, and you can't generate COM vtables without that.  Once
v0.7 is out, I'll try again.

Vadim


On Mon, Jun 3, 2013 at 5:04 AM, Alexandre Mutel <alexandre_mu...@live.com>wrote:

> Hi,
> I have not seen any reference about this, so sorry If I'm posting a
> question that got already an answer somewhere.
>
> Rust seems to provide an infrastructure for accessing exported DLL
> functions, but is there a mechanism to access COM/IUnknown objects? There
> are lots of API - under Windows - that are only accessible through COM (the
> whole DirectX API for example), or even the whole new WinRT API. Would it
> be possible to develop use traits to develop a IUnknown interface with
> virtual methods and cast a pointer to it easily?
>
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to