I guess I am not being very clear.

I am not creating other threads. I only have one ... the main Delphi thread.

I am creating different ICS components, a TTnCnx client and a TWSocketServer in separate parts of my application. There are no shared global variables and the two instances are in different units so no shared local variables.

BUT, the two objects seem to be interacting with each other as I get a TTimer access error ONLY when both objects are active and I make an actual connection to the server.



Yes, since you are creating new threads. If you create the components in the
thread constructor (or drop it on the form), their event handler will run in
the main thread context which is the active thread when the constructor is
called. You /MUST/ create the component from the Execute method (or any
method called from the Execute), and destroy it from the Execute method.

You cannot have on ICS component (let's talk about FTP as an example)
dropped on a form and the create a few threads, each one using the same
component to do file transfer. That will /not/ work. You need a separate
component for each concurrent file transfert no matter if you use threads or
not.


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to