Can COM-objects be used in a thread?

Mark Hammond mhammond at skippinet.com.au
Wed Apr 19 22:08:31 EDT 2000


Python COM fully supports all COM threading models.  However, you are
correct in that COM (not Python) does impose certain restrictions on COM
threads - however, they arent as simple to explain as "must have a message
loop" (although in some cases that is true).

I dont have time to explain in detail again.  I believe I DejaNews should
find a post from me with some detail in this area, or Andy and my book
goes into this in depth, including sample code demonstrating these
rules...

Mark.

"Olaf Trygve Berglihn" <olafb at pvv.org> wrote in message
news:dn1g0sj1vxw.fsf at kikp0524.chembio.ntnu.no...
> I'd like to make a thread work on a COM-object created by the main
> thread. Is this possible? Can the COM-object be passed to the thread
> and function properly there?
>
> I vaguely remember that somebody posted a message about this, saying
> it is not possible for a thread to host a COM-object as the main
> thread is not dispatching Windows messages to it.
> --
> * Olaf Trygve Berglihn <olafb at pvv.org>





More information about the Python-list mailing list