I'm working on writing a non-visual VCL component, but I'm having a bit of a difficulty getting it working completely right.
I have the TComponent creating a TThread to do the function of the TComponent, and firing some events that the main program can define.
Now I seem to have the events doing okay (albeit slower than my non-thread test version), by encapsulating that call in a procedure and then using Synchronize on that procedure. Is there a better way to handle that?
Then the big functionality problem: The functionality of the events requires that certain static information obtained at the beginning of the thread's execution (in PUBLIC variables) be made available in the TComponent. I'm trying to copy the variables over after the thread is started (with and without delay), but I'm not getting it returned. Any thoughts on how to solve this?
It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
I have the TComponent creating a TThread to do the function of the TComponent, and firing some events that the main program can define.
Now I seem to have the events doing okay (albeit slower than my non-thread test version), by encapsulating that call in a procedure and then using Synchronize on that procedure. Is there a better way to handle that?
Then the big functionality problem: The functionality of the events requires that certain static information obtained at the beginning of the thread's execution (in PUBLIC variables) be made available in the TComponent. I'm trying to copy the variables over after the thread is started (with and without delay), but I'm not getting it returned. Any thoughts on how to solve this?
It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.