|
-
May 21st, 2009, 05:28 AM
#1
Intercepting program crashes.
Is it possible to somehow override that ugly crash window? You know the one which prompts you to send Microsoft details about the crash?
I'm in situation where a have an application, lets call it masterManager. And masterManager manages it's many processes whom he creates, controls and close. But once in a while one of the little processes will crash and I would like for masterManager to detect it before anyone else, even end user. Even before windows display it's Application error dialog.
Any ideas on how to design and execute this? Or where to find info on the subject.
Last edited by Odiee; May 21st, 2009 at 05:29 AM.
Reason: Spelling
You just divided by zero, didn't you?
-
May 22nd, 2009, 03:18 AM
#2
Re: Intercepting program crashes.
-
May 24th, 2009, 03:29 AM
#3
Re: Intercepting program crashes.
Well, those articles may look frightening for a starter. Actually there several aspects in the situation, so let's dissect them.
1. "once in a while one of the little processes will crash"
Crash typically means that some unhandled exception occurs that cannot be handled by application, so it finally gets caght by OS providing that unfavorable dialog you hate that much.
To avoid this the application must set the top level exception handler with SetUnhandledExceptionFilter Function. Onece you install a new handler instead of the system one, you are responsible for handling, and therefore, you never see that system dialog unless you call it intentionally.
Note: application must serve this interception itself, as no other application could handle "foreign" exceptions, disregarding it's master or slave.
2. This looks easy in case your "little applications" are written by you. The process catches the exception and notifies the masterManager. But if they are not, the masterManager must "help" them do that (I mean, set exception handler), and this can be done by injection of some dll that provides the handler code as well for pre-processing crash report and communicating it to the master.
3. So this is about "injection" and "communication", that are totally different stories so far...
Last edited by Igor Vartanov; May 24th, 2009 at 06:11 AM.
Best regards,
Igor
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
|