Hello i am facing this problem were i signal a thread to exit by itself, it gets signal and exits but after i signal the thread to exit i have a waitForSingleObject call to wait until the thread exits, like this: <pre lang="c++"> //signal thread to terminate SetEvent ( hEvent ); //wait until thread exits WaitForSingleObject( hThread, INFINITE ); </pre> this code works in an exe project, but not in a dll!,when the thread exits hThread never gets signal and WaitForSingleObject stays for ever but in an exe project it works, using _beginthreadex, AfxBeginThread or CreateThread all in the exe project work but not in the dll one. What is wrong?, do i have to do something extra? :| Thanks
SetEvent(hEvent)
WaitForSingleObject(hEvent, INFINITE)
SetEvent
WaitForSingleObject(hThread, INFINITE)
hThread
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)