Disable the "application has stopped working" window
We have a .NET WCF service that should be 100% perfect timing. But sometimes we have memory leak issues in our application caused by the third party DB connectivity component. We configured nnCron to keep track of the existence of a process and when the process of this service is finished, it should start it again.
But when the application crashes, windows pop up in a noisy window, informing that the application has crashed.
Here he is:
And only when we click on the mute button "Close the program", the process really disappears from the system. And only after that the nnCron restart service. We don't want to track this window, we just want to get rid of it for nnCron to work successfully.
So how can we disable such windows?
OS is Windows 2008 r2 Standard server.
source to share
I know this is an old question, but I had the same problem and found a solution.
Call the following at the start of your application:
SetErrorMode( SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX );
I've tried this with a very simple test app that tries to dereference a null pointer. Without the line above, my test application will show "... the dialog has stopped working". With the line above, the app just dies quietly.
Literature:
EDIT: Here it is possible to disable this dialog on the system without changing the code. Create the following registry value as REG_DWORD and set the value to 1:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\DontShowUI
Reference: WER Settings
source to share