Your program has to process WM_QUERYSHUTDOWN and WM_SHUTDOWN messages
correctly.
I believe what happens in your case - you answer "yes" on queryshutdown,
system proceeds with shutdown, sends shutdown and your program can not quit
because one of the threads is in some loop or wait function waiting for
messages through socket.
You should think of a mechanism to wake that thread up and tell it to exit
or answer "no" to queryshutdown.
Killing a thread is also an option but not so pretty one.
Search for information about these messages in MSDN.
"sanket gupta" <sa****@tsucorp.net> wrote in message
news:ea**************@TK2MSFTNGP11.phx.gbl...
Hi guys ,
I face a peculiar problem.
I have a mutithreaded software trhat uses sockets to connect to my
webserver.
The problem is that while my software is running , windows is unable to
reboot/logoff or shut down.
I have to shut down the software before windows can do this.
Any suggestions on why this could be happening?
Thanks/Regards
Sanket Gupta
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!