How can I fire some event from another thread?
I have tried this:
In my COM object's constructor:
//pConnSubscriber is global void* variable, available to all threads
pConnSubscriber = this;
When I want to fire event in another thread:
//CConnectionProvider is my object
CConnectionProvider* pCS = NULL;
pCS = (CConnectionProvider*)pConnSubscriber;
//RequestStatusChanged is my event
After firing event, I get exception 0x8001010E (Invalid thread).
How can I avoid this?
Thanks in advance.