From 5904fb5636e5c8eb5265a580cd788005a014d750 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 15 Apr 2023 19:36:12 +0300 Subject: [PATCH] Disable call to ::_seterrormode when WINAPI_FAMILY is defined to something other than WINAPI_FAMILY_DESKTOP_APP. Refs #143. --- include/boost/core/detail/lwt_unattended.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/core/detail/lwt_unattended.hpp b/include/boost/core/detail/lwt_unattended.hpp index b7b06e4..96fc5fc 100644 --- a/include/boost/core/detail/lwt_unattended.hpp +++ b/include/boost/core/detail/lwt_unattended.hpp @@ -35,9 +35,13 @@ inline void lwt_unattended() # pragma clang diagnostic ignored "-Wdeprecated-declarations" # endif +#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == 100 /*WINAPI_FAMILY_DESKTOP_APP*/ + // disable message box on crash ::_seterrormode( /*SEM_NOGPFAULTERRORBOX*/ 0x0002 ); +#endif + # if defined(__clang__) # pragma clang diagnostic pop # endif