https://issues.dlang.org/show_bug.cgi?id=23819
Richard Cattermole <alphaglosi...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alphaglosi...@gmail.com --- Comment #2 from Richard Cattermole <alphaglosi...@gmail.com> --- Changing the calling convention to extern(Windows) and conversion to being a C++ interface is a documented behavior of the interface IUnknown (and in line with the definition provided by the Windows API). https://dlang.org/spec/interface.html#com-interfaces https://dlang.org/spec/abi.html#interfaces As for not warning you, it would if you marked your class Test method with override. This appears to be a requirement in general for classes and is not COM-specific. ``` onlineapp.d(2): Error: function `extern (C) void onlineapp.Test.test()` does not override any function, did you mean to override `extern (Windows) void onlineapp.IUnknown.test()`? onlineapp.d(1): Error: class `onlineapp.Test` interface function `extern (Windows) void test()` is not implemented ``` As for the mixin templates orders, the order in the vtable shouldn't be the same order as defined in IUnknown. When you cast your object to IUnknown then it'll line up, but for all other children, it won't. --