Hi
I have a standard EXE that makes an out-of-process call to an ActiveX EXE which does its thing, then raises an event, which the standard EXE consumes.
Obviously, since the ActiveX EXE raises events, the object is declared with "WithEvents" in a form, and is then instantiated when the call is made within a module.
Because the ActiveX EXE raises its events in its own time (ie I don't sit there blocking, waiting), how do I destroy the object when I'm done with it? I will be finished with it when I get an event back. Do I destroy it in the standard or ActiveX EXE?
At the moment, the ActiveX EXE object is not being destroyed (because when I get an event, I don't know from which instantiation it came from) when it's finished, so the thread count keeps going up and up and up and up, until disaster strikes
Any ideas?
Thanks,
Nick
I have a standard EXE that makes an out-of-process call to an ActiveX EXE which does its thing, then raises an event, which the standard EXE consumes.
Obviously, since the ActiveX EXE raises events, the object is declared with "WithEvents" in a form, and is then instantiated when the call is made within a module.
Because the ActiveX EXE raises its events in its own time (ie I don't sit there blocking, waiting), how do I destroy the object when I'm done with it? I will be finished with it when I get an event back. Do I destroy it in the standard or ActiveX EXE?
At the moment, the ActiveX EXE object is not being destroyed (because when I get an event, I don't know from which instantiation it came from) when it's finished, so the thread count keeps going up and up and up and up, until disaster strikes
Any ideas?
Thanks,
Nick