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 DMD crashes

Vladimir Panteleev edited this pageFeb 1, 2014 ·2 revisions

Suppressing DMD's "abnormal program termination" message box on Windows

Run the following D program in the background. It's not a perfect solution (message boxes will steal focus for a fraction of a second), but it'll keep the reduction going.

importstd.c.windows.windows;extern(Windows){HWNDFindWindowA(LPCSTR,LPCSTR);HWNDFindWindowExA(HWND,HWND,LPCSTR,LPCSTR);}voidmain(){while(true){auto h = FindWindowA("#32770",null);while (h){auto h2 = FindWindowExA(h,null,null,"\nabnormal program termination\n");if (h2){h2 = FindWindowExA(h,null,"Button","OK");if (h2)SendMessageA(h2,BM_CLICK,0,0);}h = FindWindowExA(null, h,"#32770",null);}Sleep(1);}}

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp