473,326 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

Dec 15 '05 #1
1 1781
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

Dec 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Eric | last post by:
Hi, can anyone guide me throught this: In my application, I have a global DataSet. I then run FTP processes in up to 10 simultaneous threads and each thread calls progress events in the main...
2
by: C | last post by:
All, I am trying to run my BO in a separate thread, so that I can give the user a visual of the status of my process in a asp.net page/site. All works fine, IF the ASPNET user has admin rights,...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
4
by: fred | last post by:
I use a Synclock in a secondary thread and also stop the thread using the abort method. If the abort occurs while the thread is in the Synclock will the SyncLock always be released before the...
5
by: archana | last post by:
hi all, Can someone tell me why can't we modify UI element directly from worker thread. Why we need to write delete of call invoke to modify ui element? Thanks in advance.
12
by: newscorrespondent | last post by:
There are many examples of how to get the elapsed time for a method but I can't find any example of how to measure the amount of CPU consumed by my thread in a method. Elapsed time in a...
1
by: Macca | last post by:
Hi I have a N-tier ASP.NET application that uses a data access tier to get data from a database and pass it to the middleware/business tier for processing/filtering and then passes the modified...
3
by: Bob | last post by:
Hi, I have an app that has a 3rd party phone answering control (4 of ) (interfacing with dialogic 4 line card) attached to the main form. each control raises an event when its Dialogic line...
18
by: =?Utf-8?B?VGhlU2lsdmVySGFtbWVy?= | last post by:
Because C# has no native SSH class, I am using SharpSSH. Sometimes, for reasons I do not know, a Connect call will totally lock up the thread and never return. I am sure it has something to do...
2
by: k3xji | last post by:
Hi all, This will probably be a long question/short answer, sorry, but I have wandered net about the subject and really feel cannot find just enough information.I want to ask my question by...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.