I have a COM object( let us say "first") which creates an instance of another COM object called Test. My application is integrated with VC++ and we allow this "Test" object to be debugged from our application through Visual Studio. When an user is debugging the "TEST" component from our application, the user suddenly presses "stop debugging" in the VC++ menus.
Now, The COM server/exe( "TEST" object) dies since the user has pressed "stop debugging". Here, the COM object "TEST" created using "first" Object is being debugging by VC++ from my application.
The problem is that, when the user presses "stop debugging" from VC++ for the "test" COM object, the "first" COM object hangs sometimes...because
"first" COM object holds a reference to this "TEST" object which is dead (because the user presses "stop debugging" from VC++ menus for the "TEST" object). Sometimes, the "first" com object returns a RPC Error like a good boy.Sometimes it hangs.
Is there anyway to prevent this hang ?
Thanks for your time & help,