C++ interface vs D and com

Lodovico Giaretta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 12 08:12:21 PDT 2016


On Tuesday, 12 July 2016 at 15:09:26 UTC, Adam Sansier wrote:
> So, com throughs me a interface ptr and I need to map it to an 
> interface. When I do, I get an access violation.
>
> I have an (com) ptr and an interface. How do I link them up so 
> I can call the functions?
>
> I marked the interface extern(C++) so it's a C++ style 
> interface.
>  The first field of a COM object is a pointer to its vtable.  
> This is still true in extern(C++) D, right? The calling 
> convention is thiscall.
>
> https://dlang.org/spec/cpp_interface.html

I'm not an expert in this field, but did you read this[1]?

[1] https://dlang.org/spec/interface.html#com-interfaces


More information about the Digitalmars-d-learn mailing list