I tried to post WM_CLOSE message to child thread from primary thread using Postthreadmessage in a while loop and i am ensuring that child thread is killed using Getexitcodethread(this also in while loop).The problem is it works fine in Debug Mode but it fails in RELEASE mode why?.It will not come out of while loop of GetExitCodeThread.Can u correct my logic
Nag