diff --git a/CHANGELOG.md b/CHANGELOG.md index 72f9985cb7..1a5e6c3cbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - fixed BSoD "CRITICAL_PROCESS_DIED" when terminate all sandboxed programs [#1316](https://github.com/sandboxie-plus/Sandboxie/issues/1316) - Note: we now terminate boxed processes individually instead of terminating using the job object, unless "TerminateJobObject=y" is set - fixed Ini Editor Font Selection Not Working After INI Highlighting Feature Added [#4429](https://github.com/sandboxie-plus/Sandboxie/issues/4429) +- fixed BSOD issue with 'LogMessageEvents=y' diff --git a/Sandboxie/core/drv/conf.c b/Sandboxie/core/drv/conf.c index 6eed8e05f1..a69050a025 100644 --- a/Sandboxie/core/drv/conf.c +++ b/Sandboxie/core/drv/conf.c @@ -428,6 +428,12 @@ _FX NTSTATUS Conf_Read(ULONG session_id) } } + // + // cache some config + // + + Log_LogMessageEvents = Conf_Get_Boolean(NULL, L"LogMessageEvents", 0, FALSE); + return status; } diff --git a/Sandboxie/core/drv/log.c b/Sandboxie/core/drv/log.c index 584e3a2f64..a012c2966a 100644 --- a/Sandboxie/core/drv/log.c +++ b/Sandboxie/core/drv/log.c @@ -28,6 +28,15 @@ #include "session.h" #include "conf.h" + +//--------------------------------------------------------------------------- +// Variables +//--------------------------------------------------------------------------- + + +BOOLEAN Log_LogMessageEvents = FALSE; + + //--------------------------------------------------------------------------- // Functions //--------------------------------------------------------------------------- @@ -156,7 +165,7 @@ _FX void Log_Popup_MsgEx( ULONG data = 0; - if (Conf_Get_Boolean(NULL, L"LogMessageEvents", 0, FALSE)) + if (Log_LogMessageEvents) data |= 0x01; Api_SendServiceMessage(SVC_LOG_MESSAGE, sizeof(ULONG), &data); diff --git a/Sandboxie/core/drv/log.h b/Sandboxie/core/drv/log.h index 55c93fc7a9..38c6ec0c6b 100644 --- a/Sandboxie/core/drv/log.h +++ b/Sandboxie/core/drv/log.h @@ -90,6 +90,14 @@ #define MSG_CONF_SOURCE_TEXT MSG_1412 +//--------------------------------------------------------------------------- +// Variables +//--------------------------------------------------------------------------- + + +extern BOOLEAN Log_LogMessageEvents; + + //--------------------------------------------------------------------------- // Functions //---------------------------------------------------------------------------