Also since I'm currently working with the emitting dllmain, does someone know if there are risks calling NimMain and then spawn a thread for the maincode?
I could imagine that the gc isn't running anymore or isnt aware of that I spawned Nimcode with windows' CreateThread