문제

In my program i really need to use SEH exception handlers, which catch errors like AccessViolation & etc., but handlers work only in Debug build.

I have enabled same option in Release build, but it does not work.

How to enable SEH in Release mode ANYWAY?

Thank you!

__try { /* crash code */ }
__except(EXCEPTION_EXECUTE_HANDLER { MessageBox("Crash prevented"); }

Works in Debug build mode, but not in Release (crashes).

도움이 되었습니까?

해결책

After playing with settings more i have found the solution. In Release config i had to activate "Basic Run-time checks" in page "Code generation" to enable SEH exception handlers.

"Basic Run-time checks" option cannot be used with any optimization enabled.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top