> I don't call processmessages and the like directly in the event but
> might output some lines on screen for debugging. Could the VCL maybe
> call getmessage etc. behind my back in this scenario?

You can safely add a line to a memo. You can't display a dialog box or a
modal form.
You can detect reentrancy in OnDataAvailable using a global variable. And
you can see where the reentrancy come from using the debugger and his call
stack display.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


----- Original Message ----- 
From: "Markus Humm" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Friday, September 01, 2006 7:25 AM
Subject: [twsocket] OnDataAvailable and Reetrancy


> > Can OnDataAvailable be called while it is
> > > already running?
> > > And if yes, how to prevent this? Is using critical
> > > sections a good idea here?
>
> > You must avoid having the events reentered. To avoid this, you simply
> > have
> > to _not_ call any form of the message pump from the events. The
> > message pump
> > is ProcessMessages, any modal form, GetMessage/DispatchMessage and the
> > likes.
>
> I don't call processmessages and the like directly in the event but
> might output some lines on screen for debugging. Could the VCL maybe
> call getmessage etc. behind my back in this scenario?
>
> Other thing: what about critical sections. Would they be safe for
> preventing this in my situation?
>
> Greetings
>
> Markus
> -- 
> 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

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