Hello all,
Does anybody have any experience with marshalling interfaces accross threads?
Problem description:
Application starts and creates 5 threads.
Each thread creates 5 "triggers", a COM-object and a timer.
OnTimer the thread loops through the triggers. If the triggers get triggered they call the COM-object belonging to its owning thread.
At this point I get message, saying that the COM-object was marshalled to a different thread. So I'm guessing I should be "marshalling" it to this thread (which I don't get, since the trigger operates within the context of the owning thread, which also owns the COM-object - but what the heck).
How should I do this? I've read the help and googled for it quite a bit, but I just don't understand the CoMarshalInterface() functions at all, so any help would be much appreciated.
If code is needed, I would be happy to post it here, but it is quite a lot, so I'll start work on a simple "produce.dpr"...
Thanks.
Stefan