🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.com.activex.using
Article #175

Re: What CoInitialization?

#175
From: Yogi Yang
Date: Tue, 29 Jul 2008 04:12
32 lines
1943 bytes
Marc Rohloff [TeamB] wrote:
> On Mon, 28 Jul 2008 18:26:49 +0530, Yogi Yang wrote:
> 
>> What is this CoInitialization?
>>
>> Can someone enlighten me on this please?
> 
> Initialization of the COM (ActiveX/DCOM) framework. You need to make
> sure that CoInitialize* is called on every thread that uses COM. You
> also need to make sure that every successful call to CoInitialize* is
> matched with a call to CoUninitialize.
> 
Marc,

Thanks for the info but this sounds absurd.

I have imported an ActiveX in the Delphi IDE.

Now if I start a new blank project and place this ActiveX on its form 
and run it (by pressing F9) it runs and the ActiveX behaves as documented.

But when I use this ActiveX in an existing project I keep getting this 
message.

What must be the problem?

Can you give me code snipper as to how to call CoInitialize and 
CoUnInitialize?

TIA

Yogi Yang
Technical Details
Message-ID: <488e98b2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <488dc210@newsgroups.borland.com> <1xk4rbhnvqaeu.dlg@dlg.marcrohloff.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 123df9,a5cfc09a3dc6f939
X-Google-Attributes: gid123df9,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 29 Jul 2008 09:42:35 +0530
From: Yogi Yang <yogiyang007@gmail.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: borland.public.delphi.com.activex.using
Subject: Re: What CoInitialization?
References: <488dc210@newsgroups.borland.com> <1xk4rbhnvqaeu.dlg@dlg.marcrohloff.com>
In-Reply-To: <1xk4rbhnvqaeu.dlg@dlg.marcrohloff.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 123.237.229.118
Message-ID: <488e98b2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1217304754 123.237.229.118 (28 Jul 2008 21:12:34 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 1786