Windows 7 - Disable closing the program dialog / debugging the program, as well as dump dump and user notification

I am developing a commercial Windows 7 desktop application (somewhat wrapping, but not quite). The application has both a Windows service and WPF user interface components. In case of failure of our application on the client’s site, we want to be able to collect information about the runtime environment, including an emergency dump of our processes to the dump site. This information can then be provided to our support staff upon request for further investigation. We also want to disable any dialog boxes for reporting Windows errors and sending to Microsoft that may appear as a result of a failure.

The important thing is that we want this to affect our application processes. We do not want to influence some global settings that will change the way that all other applications on the clients desktop report fatal errors.

I am looking for some suggestions and recommendations for this kind of thing in an application for shrink wrapping.

+4
source share
1 answer

The best way I know how to do this is to subscribe to the AppDomain.CurrentDomain.UnhandledException event. There you can use the Win32 API MiniDumpWriteDump function to create your own minidump file. Check out this blog post to see a good example. In addition, there is a ClrDump library.

Before exiting the UnhandledException handler, call Environment.Exit () and you will no longer see Windows error dialogs.

I have not used these mini libraries yet, but soon. I hope this answer at least gives you some keywords that you can connect to Google.

+3
source

All Articles