From e59f560c82e5c1e5d27a9345762f44a66986527f Mon Sep 17 00:00:00 2001 From: jtuc Date: Wed, 1 Nov 2017 09:14:11 +0100 Subject: [PATCH] Enable ASLR for Frhed.exe / Increment FRHED_MINOR_VERSION / Minor cleanups --- FRHED/VersionData.h | 10 ++++++---- FRHED/frhed.vcxproj | 22 ---------------------- FRHED/heksedit.vcxproj | 2 -- FRHED/version.h | 2 +- 4 files changed, 7 insertions(+), 29 deletions(-) diff --git a/FRHED/VersionData.h b/FRHED/VersionData.h index 9e9d6d1..169cc3a 100644 --- a/FRHED/VersionData.h +++ b/FRHED/VersionData.h @@ -38,12 +38,12 @@ class CVersionData } return 0; } - const CVersionData *Find(LPCWSTR szKey) const + const CVersionData *Find(LPCWSTR lpszKey) const { const CVersionData *p = First(); while (p < Next()) { - if (szKey == 0 || StrCmpW(szKey, p->szKey) == 0) + if (lpszKey == 0 || lstrcmpiW(lpszKey, p->szKey) == 0) return p; p = p->Next(); } @@ -51,7 +51,9 @@ class CVersionData } static const CVersionData *Load(HMODULE hModule = 0, LPCTSTR lpszRes = MAKEINTRESOURCE(VS_VERSION_INFO)) { - HRSRC hRes = FindResource(hModule, lpszRes, RT_VERSION); - return (const CVersionData *)LoadResource(hModule, hRes); + if (HRSRC const hFindRes = FindResource(hModule, lpszRes, RT_VERSION)) + if (HGLOBAL const hLoadRes = LoadResource(hModule, hFindRes)) + return static_cast(LockResource(hLoadRes)); + return 0; } }; diff --git a/FRHED/frhed.vcxproj b/FRHED/frhed.vcxproj index 45c2165..fb5f154 100644 --- a/FRHED/frhed.vcxproj +++ b/FRHED/frhed.vcxproj @@ -49,12 +49,10 @@ Application false NotSet - v90 Application false - v90 Application @@ -167,8 +165,6 @@ runtmchk.lib;version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - - MachineX86 @@ -195,9 +191,6 @@ runtmchk.lib;version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - false - - MachineX64 @@ -222,9 +215,6 @@ version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - false - - MachineX86 @@ -252,9 +242,6 @@ version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - false - - MachineX64 @@ -279,9 +266,6 @@ version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - false - - MachineX86 @@ -309,9 +293,6 @@ version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - false - - MachineX64 @@ -362,9 +343,6 @@ runtmchk.lib;version.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) true Windows - false - - MachineX64 diff --git a/FRHED/heksedit.vcxproj b/FRHED/heksedit.vcxproj index e6c171e..ab6e019 100644 --- a/FRHED/heksedit.vcxproj +++ b/FRHED/heksedit.vcxproj @@ -49,7 +49,6 @@ DynamicLibrary false Unicode - v90 DynamicLibrary @@ -59,7 +58,6 @@ DynamicLibrary false - v90 DynamicLibrary diff --git a/FRHED/version.h b/FRHED/version.h index 4f0afd8..350852f 100644 --- a/FRHED/version.h +++ b/FRHED/version.h @@ -28,7 +28,7 @@ Last change: 2013-04-10 by Jochen Neubeck // Note that for releases, these values are read from // versions.ini file and set here by the SetVersions.py script #define FRHED_MAJOR_VERSION 0 -#define FRHED_MINOR_VERSION 10903 +#define FRHED_MINOR_VERSION 10904 #define FRHED_SUB_RELEASE_NO 2017 #define FRHED_BUILD_NO 0