Ok. Then take a look at WSocket.MessagePump(). You need to call something like that in a loop. When WM_QUIT is issued GetMessage returns false and exits. Otherwise it returns true. Here is my message pump:
void __fastcall ReverseProxyClientThread::Execute() { //---- Place thread code here ---- while(!Terminated) messagePump(); } //--------------------------------------------------------------------------- void __fastcall ReverseProxyClientThread::messagePump(void) { MSG msg; while(GetMessage(&msg, NULL, 0, 0) && !Terminated) { DispatchMessage(&msg); } //--------------------------------------------------------------------------- Regards, SZ ----- Original Message ----- From: "Engi" <[EMAIL PROTECTED]> To: "'ICS support mailing'" <twsocket@elists.org> Sent: Friday, June 29, 2007 3:50 PM Subject: Re: [twsocket] TWSocketServer in thread > > No > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Fastream >> Technologies >> Sent: Friday, June 29, 2007 2:46 PM >> To: ICS support mailing >> Subject: Re: [twsocket] TWSocketServer in thread >> >> Do you have GetMessage or PeekMessage called in a loop in >> while(!Terminated)? >> >> Regards, >> >> SZ >> -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be