... the DLL contains initialisation and thunking code to connect it to the .NET subsytems, that needs to be called for stuff to work
I can't claim to have any knowledge about C#, but I think that
paulorfmmb has indicated that he can access his C#-built dll from C code (presumably using his MS C compiler to build the C executable).
I was thinking that if the same dll cannot be accessed by an executable built from the same C code, but built with a gcc (mingw-w64) compiler, then it's because of a difference in the environment under which the gcc-built executable is running.
If that's so, then it's just a matter of fixing the environment when running the gcc-built executable.
However, I guess it's also possible that building the executable with a Microsoft compiler does stuff that doesn't get done when building with gcc - and that this explains the failure of gcc-built apps to deliver.
Or, FAIRK, maybe the problem is something entirely different again.
Cheers,
Rob