I have a C# program that fails pretty consistently. That’s ok, I’ve created the program, it is my child, and I love it anyway. As a sort of support, I’ve decided to write a AutoHotKey wrapper around it, that automatically restarts the program until it finishes without an error. Now, I hope this doesn’t make me a terrible father, but there’s one more wish I have for the C# program:
If only it could fail without running to Windows 7 for help. The problem is that it requires me to say “Yes close the program, don’t debug it.” after Windows thinks it can find a solution to the problem.
How can I make the program simply fail without complaint? It has about 5500 more PDFs to consider, and I’ll be proud if the twin programs can just sort things out among themselves.
This seems to have been solved already, but:
SetErrorMode seems able to deactivate the Windows Error Reporting dialog box entirely for your current process. (Tested and works for my artificial access violation.)
Set uMode to
SEM_NOGPFAULTERRORBOX, that is0x0002.(btw: Seems you have created a lemming program, so you’re a lemming father.)