From d8cfc710736bdc61770e2de4c8da4654cd56b213 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 19 Jan 2023 02:35:15 +0200 Subject: [PATCH] lwt_unattended: disable WER dialog box on crash --- include/boost/core/detail/lwt_unattended.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/core/detail/lwt_unattended.hpp b/include/boost/core/detail/lwt_unattended.hpp index 68cba62..a0bf022 100644 --- a/include/boost/core/detail/lwt_unattended.hpp +++ b/include/boost/core/detail/lwt_unattended.hpp @@ -27,6 +27,14 @@ inline void lwt_unattended() // disable message boxes on assert(), abort() ::_set_abort_behavior( 0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT ); +# pragma warning(push) +# pragma warning(disable: 4996) + + // disable message box on crash + ::_seterrormode( /*SEM_NOGPFAULTERRORBOX*/ 0x0002 ); + +# pragma warning(pop) + #endif #if defined(_MSC_VER) && defined(_CPPLIB_VER) && defined(_DEBUG)