From 796ba760c31707fb34e31689f862fb03d9ef2e9f Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Mon, 30 Nov 2020 21:26:37 +0100 Subject: [PATCH] win 7 32 bit fix --- Sandboxie/core/drv/SboxDrv.vcxproj | 4 +++- Sandboxie/core/drv/mem.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Sandboxie/core/drv/SboxDrv.vcxproj b/Sandboxie/core/drv/SboxDrv.vcxproj index 41199724..aed99191 100644 --- a/Sandboxie/core/drv/SboxDrv.vcxproj +++ b/Sandboxie/core/drv/SboxDrv.vcxproj @@ -321,7 +321,9 @@ true - + + Disabled + true diff --git a/Sandboxie/core/drv/mem.c b/Sandboxie/core/drv/mem.c index 1e417a4e..2d3b5552 100644 --- a/Sandboxie/core/drv/mem.c +++ b/Sandboxie/core/drv/mem.c @@ -154,3 +154,20 @@ _FX void Mem_FreeLockResource(PERESOURCE *ppResource) *ppResource = NULL; } } + +//--------------------------------------------------------------------------- +// +// Fix for the WindowsKernelModeDriver10.0 not creating Win 7 32bit compatible code +// +//--------------------------------------------------------------------------- + +#ifndef _WIN64 +int __cdecl memcmp( + _In_reads_bytes_(_Size) void const* _Buf1, + _In_reads_bytes_(_Size) void const* _Buf2, + _In_ size_t _Size +) +{ + return (RtlCompareMemory(_Buf1, _Buf2, _Size) == _Size) ? 0 : 1; +} +#endif \ No newline at end of file