<div dir="ltr">AFAIK you can only use COM from windows anyway. OK I have been using them from linux but only with WINE help.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 2, 2017 at 3:22 PM, Guillaume Piolat via Digitalmars-d-learn <span dir="ltr"><<a href="mailto:digitalmars-d-learn@puremagic.com" target="_blank">digitalmars-d-learn@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wonder if anyone has used COM in dlang extensively.<br>
<br>
Context: I must use COM FFI interfacing on systems that aren't necessarily  Windows. It is essential that the layout of interfaces and classes are the same than in equivalent C++ objects.<br>
<br>
<br>
Question 1. Is it mandatory to inherit from core.sys.windows.unknwn.IUnkno<wbr>wn, or just having an interface named "IUnknown" validate it for being a COM interface?<br>
<br>
   If yes, then how am I supposed to use COM interfaces in other OSes? core.sys.windows.unknwn.IUnkno<wbr>wn is defined under version(Windows).<br>
<br>
   I wonder what the exact compiler hook is.<br>
<br>
<br>
Question 2. If this fails, may I emulate COM vtable layout with extern(C++) class? I wonder what the exact differences are anyway between extern(C++) and the special IUnknown.<br>
<br>
<br>
Question 3. It seems I can inherit both from A D object and a COM interface. What will be the choosen layout?<br>
</blockquote></div><br></div>