We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在main函数程序初始化的时候加入以下代码即可:
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); _set_abort_behavior(0,_WRITE_ABORT_MSG);
这样程序就悄无声息的崩溃了,不然守护进程都不起作用。如果不这样做,弹出错误对话框程序如果不点击关闭或发送错误报告就僵死在那里了,守护进程一直发现进程没挂,就不重启。
参考: [1] https://stackoverflow.com/questions/9718695/how-can-i-supress-all-error-dialogs-when-a-process-crashes-i-only-want-it-to-cr
[2] https://stackoverflow.com/questions/1861506/prevent-modal-dialog-on-win32-process-crash
The text was updated successfully, but these errors were encountered:
No branches or pull requests
title: win32 进程崩溃时禁止弹出错误对话框
date: 2018-06-15 18:58:23
tags:
- 调试
- Win32
在main函数程序初始化的时候加入以下代码即可:
这样程序就悄无声息的崩溃了,不然守护进程都不起作用。如果不这样做,弹出错误对话框程序如果不点击关闭或发送错误报告就僵死在那里了,守护进程一直发现进程没挂,就不重启。
参考:
[1] https://stackoverflow.com/questions/9718695/how-can-i-supress-all-error-dialogs-when-a-process-crashes-i-only-want-it-to-cr
[2]
https://stackoverflow.com/questions/1861506/prevent-modal-dialog-on-win32-process-crash
The text was updated successfully, but these errors were encountered: