Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Release object question

5 views
Skip to first unread message

Francois PIETTE [ICS - MidWare]

unread,
Jul 26, 2008, 1:27:10 AM7/26/08
to
Hello,

My Delphi application expose a few COM interfaces which are used from Excel
2007 VBA macros.
Everything works as expected except Delphi is unable to recreate the exe
file before the excel worksheet is closed.
I guess it is because Excel keep a reference to the exe file, maybe for the
type library.
In the VBA code, I call CreateObject, then I use the methods and properties
and the I assing "Nothing" to the object variable. Is there anything else I
can do to release the Delphi executable file ?

Thanks.

--
francoi...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

Marc Rohloff [TeamB]

unread,
Jul 28, 2008, 9:00:18 AM7/28/08
to
On Sat, 26 Jul 2008 07:27:10 +0200, Francois PIETTE [ICS - MidWare]
wrote:

> In the VBA code, I call CreateObject, then I use the methods and properties
> and the I assing "Nothing" to the object variable. Is there anything else I
> can do to release the Delphi executable file ?

You could try calling the CoFreeUnusedLibraries windows API.

--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com

Francois PIETTE [ICS - MidWare]

unread,
Jul 28, 2008, 12:56:00 PM7/28/08
to
>> In the VBA code, I call CreateObject, then I use the methods and
>> properties
>> and the I assing "Nothing" to the object variable. Is there anything else
>> I
>> can do to release the Delphi executable file ?
>
> You could try calling the CoFreeUnusedLibraries windows API.

Doesn't work. No error, simply does nothing.

0 new messages