- Notifications
You must be signed in to change notification settings - Fork17
Suppressing Windows crashes
Vladimir Panteleev edited this pageDec 7, 2014 ·3 revisions
The following D program will launch another program with the general protection fault error dialog disabled.
importstd.process;extern(Windows)void SetErrorMode(int);enum :uint {SEM_FAILCRITICALERRORS =1,SEM_NOGPFAULTERRORBOX =2 }intmain(string[] args){SetErrorMode(SEM_FAILCRITICALERRORS |SEM_NOGPFAULTERRORBOX);returnspawnProcess(args[1..$]).wait();}