WIn32api

Mark Hammond skippy.hammond at gmail.com
Fri Feb 6 16:59:57 EST 2009


On 7/02/2009 3:28 AM, K-Dawg wrote:

You might like to seek out the python-win32 mailing list for stuff like 
this where more people tend to pay attention to windows problems.

> This works if I call run() specifically. But when I try to initiate the
> thread with .start() I get the following error

Unfortunately threads and COM are tricky.  The short story is that you 
can't, in the general case, pass a COM object from one thread to 
another.  You need to google "COM threading models", and if you *really* 
want to pass objects between threads, the impressively named MSCOM 
function CoMarshalInterThreadInterfaceInStream (exposed via the 
pythoncom module).  The above mailing list has had a number of threads 
on this issue over the years...

Cheers,

Mark



More information about the Python-list mailing list