Can I use win32 COM object in a thread?

P

Pelmen

When I try to call a method of COM object, it return error about "There
wasn't 'CoInitialize' call", or if I use thread, I have to access COM
object methods in other way?

thanks for any help
 
P

Pelmen

Sorry for post, answer was near ... just do search

2. Ixokai

From: "Ixokai" <[email protected]>
Mon, 9 Feb 2004 11:05:08 -0800


Basically, adodbapi uses COM, and COM and threads require a bit of
care,
apparently. Your webkit thing may be using a thread to handle stuff.


import pythoncom
pythoncom.CoInitialize()
.... code ...
pythoncom.CoUnitialize()


You need to call pythoncom.CoInitialize() once for each thread...
theres
something about sys.coinit_flags = 0 (or 1) that may be nessecary but I

don't know what they mean precisely :)


--Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top