https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bcfd350e9fb053ba8fb8b…
commit bcfd350e9fb053ba8fb8bbf86c2ae3107a17c819
Author: Denis Malikov <Getequ(a)users.noreply.github.com>
AuthorDate: Sun Jan 27 23:30:37 2019 +0700
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Jan 27 17:30:37 2019 +0100
[APPCOMPAT] Run apps in compatibility with 6.1 SP1 (7 SP1), 6.2 (8) and 6.3 (8.1)
(#1273)
---
dll/appcompat/shims/layer/versionlie.c | 4 ++++
dll/shellext/acppage/CLayerUIPropPage.cpp | 3 +++
media/sdb/sysmain.xml | 15 +++++++++++++++
modules/rostests/apitests/appshim/versionlie.c | 2 ++
4 files changed, 24 insertions(+)
diff --git a/dll/appcompat/shims/layer/versionlie.c
b/dll/appcompat/shims/layer/versionlie.c
index 38db1d0a19..a1a18dc092 100644
--- a/dll/appcompat/shims/layer/versionlie.c
+++ b/dll/appcompat/shims/layer/versionlie.c
@@ -47,6 +47,7 @@ VersionLieInfo g_WinVistaSP1 = { 0x17710006, 6, 0, 6001,
VER_PLATFORM_WIN32_NT,
VersionLieInfo g_WinVistaSP2 = { 0x17720006, 6, 0, 6002, VER_PLATFORM_WIN32_NT, 2, 0 };
VersionLieInfo g_Win7RTM = { 0x1db00106, 6, 1, 7600, VER_PLATFORM_WIN32_NT, 0, 0 };
+VersionLieInfo g_Win7SP1 = { 0x1db10106, 6, 1, 7601, VER_PLATFORM_WIN32_NT, 1, 0 };
VersionLieInfo g_Win8RTM = { 0x23f00206, 6, 2, 9200, VER_PLATFORM_WIN32_NT, 0, 0 };
VersionLieInfo g_Win81RTM = { 0x25800306, 6, 3, 9600, VER_PLATFORM_WIN32_NT, 0, 0 };
@@ -230,6 +231,9 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA
lpOsVersionI
#define VERSION_INFO g_Win7RTM
#include "versionlie.inl"
+#define SHIM_NS Win7SP1VersionLie
+#define VERSION_INFO g_Win7SP1
+#include "versionlie.inl"
#define SHIM_NS Win8RTMVersionLie
#define VERSION_INFO g_Win8RTM
diff --git a/dll/shellext/acppage/CLayerUIPropPage.cpp
b/dll/shellext/acppage/CLayerUIPropPage.cpp
index a60f03ef2f..fdc34e8bbb 100644
--- a/dll/shellext/acppage/CLayerUIPropPage.cpp
+++ b/dll/shellext/acppage/CLayerUIPropPage.cpp
@@ -38,6 +38,9 @@ static struct {
{ L"Windows Vista (SP1)", L"VISTASP1" },
{ L"Windows Vista (SP2)", L"VISTASP2" },
{ L"Windows 7", L"WIN7RTM" },
+ { L"Windows 7 (SP1)", L"WIN7SP1" },
+ { L"Windows 8", L"WIN8RTM" },
+ { L"Windows 8.1", L"WIN81RTM" },
{ NULL, NULL }
};
diff --git a/media/sdb/sysmain.xml b/media/sdb/sysmain.xml
index 1dd096d2b0..472cded8f6 100644
--- a/media/sdb/sysmain.xml
+++ b/media/sdb/sysmain.xml
@@ -173,6 +173,15 @@
<EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
+ <SHIM NAME="Win7SP1VersionLie">
+ <INCLUDE MODULE="shell32.dll" />
+ <INCLUDE MODULE="msi.dll" />
+ <EXCLUDE MODULE="kernel32.dll" />
+ <EXCLUDE MODULE="msvcrt.dll" />
+ <EXCLUDE MODULE="ole32.dll" />
+ <EXCLUDE MODULE="oleaut32.dll" />
+ <DLLFILE>aclayers.dll</DLLFILE>
+ </SHIM>
<SHIM NAME="Win8RTMVersionLie">
<INCLUDE MODULE="shell32.dll" />
<INCLUDE MODULE="msi.dll" />
@@ -319,6 +328,12 @@
<DATA NAME="SHIMVERSIONNT" DATA_DWORD="601" />
<!-- TODO: Add more fixes! -->
</LAYER>
+ <LAYER NAME="WIN7SP1">
+ <!-- ReactOS specific. Windows does not have this version lie -->
+ <SHIM_REF NAME="Win7SP1VersionLie" />
+ <DATA NAME="SHIMVERSIONNT" DATA_DWORD="601" />
+ <!-- TODO: Add more fixes! -->
+ </LAYER>
<LAYER NAME="WIN8RTM">
<SHIM_REF NAME="Win8RTMVersionLie" />
<DATA NAME="SHIMVERSIONNT" DATA_DWORD="602" />
diff --git a/modules/rostests/apitests/appshim/versionlie.c
b/modules/rostests/apitests/appshim/versionlie.c
index 43c9dc665c..328190668b 100644
--- a/modules/rostests/apitests/appshim/versionlie.c
+++ b/modules/rostests/apitests/appshim/versionlie.c
@@ -281,6 +281,7 @@ VersionLieInfo g_WinVistaSP1 = { 0x17710006, 6, 0, 6001,
VER_PLATFORM_WIN32_NT,
VersionLieInfo g_WinVistaSP2 = { 0x17720006, 6, 0, 6002, VER_PLATFORM_WIN32_NT, 2, 0 };
VersionLieInfo g_Win7RTM = { 0x1db00106, 6, 1, 7600, VER_PLATFORM_WIN32_NT, 0, 0 };
+VersionLieInfo g_Win7SP1 = { 0x1db10106, 6, 1, 7601, VER_PLATFORM_WIN32_NT, 1, 0 }; /*
ReactOS specific. Windows does not have this version lie */
VersionLieInfo g_Win8RTM = { 0x23f00206, 6, 2, 9200, VER_PLATFORM_WIN32_NT, 0, 0 };
VersionLieInfo g_Win81RTM = { 0x25800306, 6, 3, 9600, VER_PLATFORM_WIN32_NT, 0, 0 };
@@ -400,6 +401,7 @@ START_TEST(versionlie)
run_test("VistaSP1VersionLie", &g_WinVistaSP1);
run_test("VistaSP2VersionLie", &g_WinVistaSP2);
run_test("Win7RTMVersionLie", &g_Win7RTM);
+ run_test("Win7SP1VersionLie", &g_Win7SP1); /* ReactOS specific.
Windows does not have this version lie */
run_test("Win8RTMVersionLie", &g_Win8RTM);
run_test("Win81RTMVersionLie", &g_Win81RTM);
}