Board index » cppbuilder » Firing COM events from worker threads
Arron Edward
![]() CBuilder Developer |
Mon, 09 Jun 2003 17:36:48 GMT
Firing COM events from worker threads
Hi,
I have a EXE COM server running in a Multithreaded apartment. The application works, but when I come to fire events from a worker I have three worker threads in a test application as shown below. If I This is where it gets confussing... When I start the threads via a I have tried many things 'marshalling' etc.. nothing works! Could someone please help? Thanks in advance Arron // ************************** int Badgers = 0; m_MemoText = m_IDString.c_str(); Synchronize(AddToMemo); if (m_IDString == "ThreadOne") if (m_Interface) Quote} // CLIENT CALL // ********************** STDMETHODIMP TServerMethodsImpl::StartTunes() { try { TMainForm *MainForm = dynamic_cast<TMainForm*>(Application->MainForm); MainForm->ThreadButtonOneClick(NULL); MainForm->ThreadButtonTwoClick(NULL); MainForm->ThreadButtonThreeClick(NULL); } catch(Exception &e) { return Error(e.Message.c_str(), IID_IServerMethods); } return S_OK; Quote}; |