Login  Register

ActiveX Control Destruction

Posted by Runar Jordahl-2 on Jan 23, 2005; 10:37am
URL: https://forum.world.st/ActiveX-Control-Destruction-tp3372787.html

I am using an ActiveX control, which, due to the license, only allows four
"instances" to be active at any given time. Below is an example of how I
create the control and invoke a function:

site :=AXControlSite  progId: 'MP3PLAY.Mp3playCtrl.1'.

mp3Control := site controlDispatch.

mp3Control aboutBox.

Now, if I keep evaluating the code above, the control will not work the
fifth time. It seems like "destruction" of ActiveX controls must be handled
explicitly, and that normal Smalltalk garbage collection will not destroy
instances created. If I however exit Dolphin Smalltalk and restart again, I
am again allowed to invoke functions on the control.

My question is, how do I "destroy" an instantiated ActiveX control from
Dolphin Smalltalk?

Below is the assistance I received from the creators of the control, when
asking how the control should be deleted:If you have a knowledge about C++
language, the proportion would be: "control creation" : "new statement" =
"control destruction" : "delete statement"