Solved

COM server  hangs  when the user presses  "stop debugging" from Visual Studio menus

Posted on 2001-07-20
3
216 Views
Last Modified: 2013-11-20
Hi,

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,

Sankar









0
Comment
Question by:sankar012898
  • 2
3 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6305124
have disconnect option on your first object which you can call - which will disconnect it from the TEST object and then 'stop debugging' the TEST object
0
 

Author Comment

by:sankar012898
ID: 6310845
Hi Shaun Wilde,

Thanks for your answer. It was very useful to us.
Please put it as an "answer" and I will accept it.

Thanks
Sankar
0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 200 total points
ID: 6311331
an answer see above - by the way you can also accept comments as answers
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 32
Whole sheet autoscrub still needed 19 48
Looking for a specific application/software 2 104
WinWaitActive parameters 12 31
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now