
3 Jun
2009
3 Jun
'09
10:45 a.m.
When the SerialPort receive data, pass it to the ATDispatcher that raises a signal to the TETRAMoto object that parses the data and raise the event (always a signal) to the extern:
asio::serial_port -> SerialPort -> ATDispatcher -> TetraMoto -|-> EXTERN
Now I have to encapsulate this lib into an ActiveX DLL to be used by VB6 and I have to call CoInitizeEx in the thread that "raise" events..
My question is: where I have to call CoInitizeEx?
You can start the threads with your own thread-function (instead of io_service::run) that would call CoInitialize(), io_service::run(), CoUninitialize().