Are you using WaitForX (Single Object, MultipleObjects) or MsgWaitForX (same thing) at all? More than one critical section, leading to a deadlock situation?. Otherwise, your applciaiton wants to exit, but one or more of your threads are still blocked waiting for a mutex, event, etc. You should design your threads to wait for MORE than one object, typically the processing object, and an event object you can 'set' from the main thread when the program is about to exit. Then when progrma is about to exit, it signals event for thread(s) to exit, waits for thread(s) to exit, and then the main program's thread can exit. How do you detect that a thread has exited? The thread can set an event the main thread is waiting on, the thread can clear/set a variable the main thread can check, or main thread can wait for thread handle to be signaled. see documentaiton for _beginthreadex