Delphi 7 & Indy 10 OnCommand Event and VCL Components Thread Safe?
Posted on 2007-04-10
I am using Delphi 7 and Indy 10 components.
In the TidCommandHandler component I have created several commands and in their OnCommand events I have code that updates VCL components.
If I am not mistaken the events of the TidCommandHandler's commands occurs in a Threads handled by Indy itself. Do I need to take any special caution when updating VCL components in these events? I experience some problem errors, "EOSERROR with Code 1400, invalid window handle" and I am sure it is because I am not updating the VCL in a thread safe manner.
Can you please help me and show me how should I update VCL components in a safe manner in these events?
Thanks in advance!