PDA

View Full Version : InitLibrary() and startLive(), stopLive() in different threads



julien.lemaitre
June 10, 2011, 16:38:56
Hi,

I want to be able to call start and stopLive() from within a different thread than InitLibrary().

However, it is was suggested on this forum that it might be problematic:
http://www.theimagingsourceforums.com/archive/index.php/t-320580.html
http://www.theimagingsourceforums.com/archive/index.php/t-319272.html

Is there any workaround?

thanks
Julien

Stefan Geissler
June 10, 2011, 17:24:38
Hello

As far as I know, the problem is the COM library. I think, you must call CoInitializeEx() at least in every thread you use.

julien.lemaitre
June 13, 2011, 09:48:02
Hi Stefan,

That's what I did: I called InitLibrary() in one thread, and then later on in another thread, I called CoInitializeEx() just before startLive().

It is working fine so far. Thank you for the suggestion.

Julien