Could someone please help me with an issue regarding ActiveX out of process servers and specificaly how to tidy up, or dispose of them when they are nolonger required.
I have created an Active X exe project in VB6 and this seems to work OK (I used to be able to step into it and debug it using another instance of VB, but I can no-longer do that for some reason).
Anyway my main application creates an instance of the ActiveX server via a menu option and then calls one of it's public methods i.e.
public sub menu_click1
dim machine_reporting as clsmachinereport
machine_reporting = new clsmachinereport
machine_reporting.show_report
end sub
This works OK and obviously creates an instance of the Active X server and shows a report form (also exe can be seen in task manager).
However if I end my main application , the active X server still stays active/running, presumably because it is running in it's own process space.
In point of fact the customer quite likes this effect, but I would like to be able to kill the instance of the Active X server when my main application program ends.
I thought that from reading the Microsoft documentation that this would happen automatically, as the server keeps a count of the number of clients it is communicating with.
I am obviously missing something somwehere, so if someone could please enlighten me, it would be much appreciated.
Thanks
I have created an Active X exe project in VB6 and this seems to work OK (I used to be able to step into it and debug it using another instance of VB, but I can no-longer do that for some reason).
Anyway my main application creates an instance of the ActiveX server via a menu option and then calls one of it's public methods i.e.
public sub menu_click1
dim machine_reporting as clsmachinereport
machine_reporting = new clsmachinereport
machine_reporting.show_report
end sub
This works OK and obviously creates an instance of the Active X server and shows a report form (also exe can be seen in task manager).
However if I end my main application , the active X server still stays active/running, presumably because it is running in it's own process space.
In point of fact the customer quite likes this effect, but I would like to be able to kill the instance of the Active X server when my main application program ends.
I thought that from reading the Microsoft documentation that this would happen automatically, as the server keeps a count of the number of clients it is communicating with.
I am obviously missing something somwehere, so if someone could please enlighten me, it would be much appreciated.
Thanks