|
-
June 27th, 2008, 03:17 AM
#1
Close gracefully when crashing?
How to close a C# application gracefully when crashes or end-process by task manager?
This C# application is a COM client & the COM server is C++ which runs as a Service. When C# client crashes or end-process, it doesn't call the COM object's destructor. So the Server keeps that object as a live one.
Any suggestion?
(If the client is closed gracefully, it calls the destructor of COM object. So the Server knows the object is no longer available.)
-
June 27th, 2008, 03:57 AM
#2
Re: Close gracefully when crashing?
First, your application should not crash. If it crashes it means your not handling exceptions appropriately.
As for TerminateProcess, I guess this explanation is good enough: http://blogs.msdn.com/oldnewthing/ar...22/191123.aspx.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|