Solved

How do I use OLE in Threads?

Posted on 1999-01-25
5
138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363212
Use CreateOleObject!
0
 

Author Comment

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

Expert Comment

by:Madshi
ID: 1363214
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
ID: 1363215
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
ID: 1363216
Thank you for the points...  :-)))
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 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