[Solved] How to create multiplethreads each with different ThreadProc() function using CreateThread()
Try this: DWORD WINAPI ThreadProc1( LPVOID lpParameter) { … return 0 ; } DWORD WINAPI ThreadProc2( LPVOID lpParameter) { … return 0 ; } … typedef DWORD (WINAPI * THREADPROCFN)(LPVOID lpParameter); THREADPROCFN fntable[4] = {ThreadProc1, ThreadProc2, …} ; //Start the threads for (int i = 0; i < max_number; i++) { DWORD ThreadId ; CreateThread( … Read more