Here is a part of my Execute() code :

        try
        {
                while (GetMessage(&msg, NULL, 0, 0) && !Terminated)
                {
                        DispatchMessage(&msg);

                        if (!DialogError)
                        {
                                ...             
                                ...
                                ...
                        }

                        Sleep(1);
                }
        }
        catch(Exception &e)
        {
                if (DebugActif) OutputDebugString("*** exception: " +
e.Message);
        }

Is it correct ?


 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Fastream 
> Technologies
> Sent: Friday, June 29, 2007 2:56 PM
> To: ICS support mailing
> Subject: Re: [twsocket] TWSocketServer in thread
> 
> 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
> 
> 
> __________ NOD32 2363 (20070629) Information __________
> 
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
> 
> 

-- 
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

Reply via email to