On Thursday, 25 February 2016 at 14:01:30 UTC, Thalamus wrote:
I don't control the EXE itself and the code I write to
interface with it must be either C# or JavaScript, but this
repros with a test C# driver EXE as well. The interfacing C#
code can only be aware of the exposed D DLL functions defined
in .def and shouldn't be aware directly of Class A, B, or
ClassMapper, the factory specifically, etc..
Make sure your DLL must initialize the D runtime, which is where
shared static constructors should get called.
http://wiki.dlang.org/Win32_DLLs_in_D
Alternatively you can call Runtime.initialize() yourself in your
entry point.