D DLL crashes if not run on the main thread

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Wed Sep 6 01:28:20 UTC 2023


Assuming it works outside of a DLL, you're probably missing the runtime 
initialization calls.

Mix SimpleDllMain in (or do your own). 
https://github.com/dlang/dmd/blob/9639d72ea0883808feff7aba71d87c5a78fb7f92/druntime/src/core/sys/windows/dll.d#L577


More information about the Digitalmars-d-learn mailing list