On Tuesday, 16 July 2019 at 01:38:49 UTC, evilrat wrote:
As you can see it is by design. IUnknown has different vtbl[] comparing to regular D classes/interfaces. If it works with declaring your own empty IUnknown use it, also you can try extern(C++) which does similar thing to vtable, it might even work!
...
Oh and let me put this here... Have you seen this? It even has very simple xaudio example. https://code.dlang.org/packages/directx-d
Yes, i found that after posting. Declaring your interface extern(C++) and the methods in the interface extern(Windows) seems to do the trick. I hoped there would be a more elegant solution than to annotate each interface, but oh well.
Thanks anyway!