win 7 32 bit fix

This commit is contained in:
DavidXanatos 2020-11-30 21:26:37 +01:00
parent ecaa4c343b
commit 796ba760c3
2 changed files with 20 additions and 1 deletions

View File

@ -321,7 +321,9 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='SbieRelease|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="log.c" />
<ClCompile Include="mem.c" />
<ClCompile Include="mem.c">
<Optimization Condition="'$(Configuration)|$(Platform)'=='SbieRelease|Win32'">Disabled</Optimization>
</ClCompile>
<ClCompile Include="obj.c" />
<ClCompile Include="obj_xp.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='SbieDebug|Win32'">true</ExcludedFromBuild>

View File

@ -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