http://bugs.winehq.org/show_bug.cgi?id=30947
--- Comment #9 from Vincent Povirk madewokherd@gmail.com 2012-06-21 11:05:55 CDT --- That's exactly what I needed. I think I know what's happening now.
Mono's DllMain's THREAD_ATTACH handler apparently calls some functions that require mono_jit_init to have been called. The result, if mono_jit_init hasn't been called, is that mono enters a static CRITICAL_SECTION that it hasn't initialized yet, which causes it to wait forever inside DllMain, which is of course very bad.
In this case, we load Mono but never use the runtime, so we don't ever call mono_jit_init, and things go very wrong when the program creates a thread.
AFAICT there's no safe way for us to use Mono as long as it's doing this. As soon as LoadLibrary returns, it's possible that someone will create a new thread before we can call mono_jit_init.