This code is in a .dll and the constructor class is called from other .dll (a.dll for example) using LoadLibrary and GetProcAddress.
If a.dll is called from myapp.exe, it runs ok and the thread is created, but if a.dll is called from anyAppSystem.exe all runs ok but the thread is not created.
I was thinking the problem was the thread security level but I don't have any idea...