Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Jan : need help - ActiveX DLL crashes when using certain third-party components

www.cryer.info
Managed Newsgroup Archive

need help - ActiveX DLL crashes when using certain third-party components

Subject:need help - ActiveX DLL crashes when using certain third-party components
Posted by:"Arthur Hoornweg" (antispam.hoornweg@casema.nl.net)
Date:Tue, 30 Jan 2007 12:57:05

Hello all,

I am working on an activeX dll.

It works fine, but.... As soon as I use Turbopower ShellShock or
some other third-party vcl libraries in this DLL, my main application
that calls the DLL crashes upon termination. Perfectly reproducible.

I've noticed that these third-party libraries all have in common that
they call coinitialize() and OleInitialize() sometime in their
initialization
and coUnInitialize() and OleUninitialize() somewhere in their finalization
sections.

Just for my understanding.

My main application already makes these calls. The DLL is called
through Ole so Ole must already be initialized. So couldn't I just
remove these calls from the DLL? Or skip the call when the module
is a DLL by doing something like "If not Islibrary then CoInitialize(Nil)" ?


--
Arthur Hoornweg

(In order to reply per e-mail, please just remove the ".net"
  from my e-mail address. Leave the rest of the address intact
  including the "antispam" part. I had to take this measure to
  counteract unsollicited mail.)

Replies:

www.cryer.info
Managed Newsgroup Archive