Solved

How do I use OLE in Threads?

Posted on 1999-01-25
5
133 Views
Last Modified: 2010-04-06
I want to use OLE in Threads. To be more specific I use Delphis CreateComObject i my Threads, but every time I get the following error "test.exe raised exception class EOleSysError woth message 'CoInitialize has not been called'.....

Does anybody has an answer to help me out on this?

0
Comment
Question by:alpharvs
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Epsylon
Comment Utility
Use CreateOleObject!
0
 

Author Comment

by:alpharvs
Comment Utility
Hello Epsylon,
It didn't work, I get the same error.
0
 
LVL 20

Expert Comment

by:Madshi
Comment Utility
In the beginning of each thread do this:
  CoInitialize(nil);
At the end of each thread do this:
  CoUninitialize;

Regards, Madshi.
0
 

Author Comment

by:alpharvs
Comment Utility
Hey It worked!

Thanks....

Hey Madshi - Could you post an answer?

Otherwise I can't give you any points.....


0
 
LVL 20

Accepted Solution

by:
Madshi earned 330 total points
Comment Utility
Thank you for the points...  :-)))
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now