I am using Hudson as a continuous integration server to test C/C++ code. Unfortunatly, I have a bug somewhere that causes memory corruption, so on some Windows machines I w
drwtsn32.exe -i
to set Dr. Watson as the default system debugger. Dr. Watson will generate a core dump and silently exit. (See this Microsoft Knowledge Base article: http://support.microsoft.com/kb/q121434/.) Use a try/catch statement to catch the exception and handle it the way you want.
In addition to what rkb said, if you are running Windows XP 64bit, there are two sets of values. The ones in the usual registry location and the ones under the Wow6432Node
key in HKLM
. In order to update both, run drwtsn32.exe -i
from both %SYSTEMROOT%\system32
and %SYSTEMROOT%\SysWOW64
.
Disable error reporting via:
You can use the various _CrtSetReport functions to control the way the C/C++ runtime responds to various errors (_CrtSetReportHook, _CrtSetReportMode, _CrtSetReportFile, _CrtSetReportHook2)
You can also do something like this programaticaly using SetErrorMode. See this article for more details.
A simple example of how to use it is to do the following:
SetErrorMode(GetErrorMode () | SEM_NOGPFAULTERRORBOX);
The above 'ORs' the current mode with our desired addition.