Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Suppressing Windows crashes

Vladimir Panteleev edited this pageDec 7, 2014 ·3 revisions

Suppressing the standard "Program has stopped working" dialog on Windows

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();}

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp