O
Oenone
I'm developing a wrapper around a series of VB6 plugins that I now want to
be able to run in my VB.NET application.
Everything is working fine, except I can't find a way to get the
Class_Terminate from the VB6 classes to fire when I've finished with the
objects.
In VB6, these obviously fire when the last reference to the object is set to
Nothing. In .NET, this doesn't happen until I close my application (or,
presumably, when the garbage collector next runs).
Is there any way that I can force the VB6 classes to terminate? Some of them
have clean-up code in their Terminate events, and without running this I'm
worried that I may end up leaving resources locked. I have a Dispose method
in my .NET wrapper class so I have a point in code at which I could trigger
the termination, but I can't find a way to make it happen.
My thanks in advance,
be able to run in my VB.NET application.
Everything is working fine, except I can't find a way to get the
Class_Terminate from the VB6 classes to fire when I've finished with the
objects.
In VB6, these obviously fire when the last reference to the object is set to
Nothing. In .NET, this doesn't happen until I close my application (or,
presumably, when the garbage collector next runs).
Is there any way that I can force the VB6 classes to terminate? Some of them
have clean-up code in their Terminate events, and without running this I'm
worried that I may end up leaving resources locked. I have a Dispose method
in my .NET wrapper class so I have a point in code at which I could trigger
the termination, but I can't find a way to make it happen.
My thanks in advance,