[APPCOMPAT] Run apps in compatibility with 6.1 SP1 (7 SP1), 6.2 (8) and 6.3 (8.1...
authorDenis Malikov <Getequ@users.noreply.github.com>
Sun, 27 Jan 2019 16:30:37 +0000 (23:30 +0700)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Sun, 27 Jan 2019 16:30:37 +0000 (17:30 +0100)
dll/appcompat/shims/layer/versionlie.c
dll/shellext/acppage/CLayerUIPropPage.cpp
media/sdb/sysmain.xml
modules/rostests/apitests/appshim/versionlie.c

index 38db1d0..a1a18dc 100644 (file)
@@ -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
index a60f03e..fdc34e8 100644 (file)
@@ -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 }
 };
 
index 1dd096d..472cded 100644 (file)
                 <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" />
             <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" />
index 43c9dc6..3281906 100644 (file)
@@ -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);
 }