DisableThreadLibraryCalls Function http://msdn.microsoft.com/en-us/library/ms682579.aspx Note: Do not call "DisableThreadLibraryCalls" in a DLL which is statically linked to the CRT http://support.microsoft.com/kb/555563/en-us For plugin author: If you need to implement DllMain entry point yourself, get rid of the #include "DisableThreadLibraryCalls.h" line.