C++项目,windows如何样让程序爆掉的时候不弹出任何提示,直接退出
C++项目,windows怎么样让程序爆掉的时候不弹出任何提示,直接退出
C++项目,windows怎么样让程序爆掉的时候不弹出任何提示,直接退出。release下?debug肯定是提示的,但是我看很多软件爆了还是会提示的,怎么让他不提示,跟linux里爆掉一样,直接退出
------解决方案--------------------
这个有很多办法的。
可以通过函数SetUnhandledExceptionFilter()设置回调函数,用来处理程序未处理异常。可以参考
http://blog.****.net/alicehyxx/article/details/4355802。
------解决方案--------------------
MiniDump
------解决方案--------------------
试下SetErrorMode();
0
Use the system default, which is to display all error dialog boxes.
SEM_FAILCRITICALERRORS
0x0001
The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process.
SEM_NOALIGNMENTFAULTEXCEPT
0x0004
The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures. For more information, see the Remarks section.
After this value is set for a process, subsequent attempts to clear the value are ignored.
SEM_NOGPFAULTERRORBOX
0x0002
The system does not display the general-protection-fault message box. This flag should only be set by debugging applications that handle general protection (GP) faults themselves with an exception handler.
SEM_NOOPENFILEERRORBOX
0x8000
The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling process.
------解决方案--------------------
try
{
}
catch
{
}
不行么?
------解决方案--------------------
搜SEH
C++项目,windows怎么样让程序爆掉的时候不弹出任何提示,直接退出。release下?debug肯定是提示的,但是我看很多软件爆了还是会提示的,怎么让他不提示,跟linux里爆掉一样,直接退出
------解决方案--------------------
这个有很多办法的。
可以通过函数SetUnhandledExceptionFilter()设置回调函数,用来处理程序未处理异常。可以参考
http://blog.****.net/alicehyxx/article/details/4355802。
------解决方案--------------------
MiniDump
------解决方案--------------------
试下SetErrorMode();
0
Use the system default, which is to display all error dialog boxes.
SEM_FAILCRITICALERRORS
0x0001
The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process.
SEM_NOALIGNMENTFAULTEXCEPT
0x0004
The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures. For more information, see the Remarks section.
After this value is set for a process, subsequent attempts to clear the value are ignored.
SEM_NOGPFAULTERRORBOX
0x0002
The system does not display the general-protection-fault message box. This flag should only be set by debugging applications that handle general protection (GP) faults themselves with an exception handler.
SEM_NOOPENFILEERRORBOX
0x8000
The system does not display a message box when it fails to find a file. Instead, the error is returned to the calling process.
------解决方案--------------------
try
{
}
catch
{
}
不行么?
------解决方案--------------------
搜SEH