Hi,
1 )Please check what your thread function is returning ......
2 )If you are using Win32 function CreateThread to create threads then Please check the prototype of your thread function.
It should have prototype
DWORD WINAPI ThreadProc( LPVOID lpParameter);
Following prototype will cause problem on 64 bit architecture
void WINAPI ThreadProc( LPVOID lpParameter);
You are expected to return status code from the thread function.