Hi,
i have just solved a thread EAccessVilation Problem in my TThread
(C++Builder). The problem was that i have accessed a function from a
other module inside the threads execute block:
------------------------------------------------------------------------
int returnFunctionValue() {
test = Form1->MyClass->function();
}
void __fastcall Automatic::Execute() {
....
while (Terminated) {
....
Synchronize(&returnFunctionValue); //the solution
test = Form1->MyClass->function(); //the error
....
}
}
------------------------------------------------------------------------
i solved this by a seperate function which ist called by a Synchronize.
NOW THE QUESTION ;-)
can i use templates defined in my main.h inside the thread-modules
execute block without Synchronize without gettint this EAccessViolation?