for( int nIterator = 0; nIterator< 100; nIterator++ )
{
m_hThread[ nIndex++ ] = CreateThread( NULL,0,( LPTHREAD_START_ROUTINE )FileWriteOne,this,0,NULL );
m_hThread[ nIndex++ ] = CreateThread( NULL,0,( LPTHREAD_START_ROUTINE )FileWriteTwo, this,0,NULL );
}
DWORD dwRet = WaitForMultipleObjects( nIndex, m_hThread, FALSE, INFINITE );
DWORD dwLastErr = GetLastError();
The return value of WaitForMultipleObjects handle is 87.This shows an error that “parameters are incorrect”. but the parameters are correct.If there is only 10 threads,it will return 0 else it will return 87.So What I have to do to correct this error??