Try removing the
andCode:CloseHandle(phThread[0]);
from the thread functions themselves, you will need the handles in the main thread to get the return code and for the WaitForMultipleObjects call.Code:phThread[0] = NULL;
Also the thread functions should be defined as returning a DWORD (you can just return 0).
See if that fixes your problem.




Reply With Quote