Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 15th, 2005, 04:45 AM
Pelmen
Guest
 
Posts: n/a
Default Can I use win32 COM object in a thread?

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

  #2  
Old December 15th, 2005, 05:15 AM
Pelmen
Guest
 
Posts: n/a
Default Re: Can I use win32 COM object in a thread?

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

2. Ixokai

From: "Ixokai" <use...@ixokai.net>
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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles