https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b7495019761a169a29ee7…
commit b7495019761a169a29ee733e1265d7c29fe72ff7
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua>
AuthorDate: Fri Oct 25 20:50:43 2019 +0300
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Feb 23 17:43:40 2020 +0100
[APPCOMPAT][ACCPAGE][SDB][ROSTESTS] Implement compatibility modes for Windows 10,
Server 2016 and 2019
---
dll/appcompat/shims/layer/versionlie.c | 20 +++++++++++
dll/shellext/acppage/CLayerUIPropPage.cpp | 9 +++--
media/sdb/sysmain.xml | 47 +++++++++++++++++++++++++-
modules/rostests/apitests/appshim/versionlie.c | 7 ++++
4 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/dll/appcompat/shims/layer/versionlie.c
b/dll/appcompat/shims/layer/versionlie.c
index a1a18dc0922..7ed6c75b90c 100644
--- a/dll/appcompat/shims/layer/versionlie.c
+++ b/dll/appcompat/shims/layer/versionlie.c
@@ -52,6 +52,11 @@ 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 };
+VersionLieInfo g_Win10RTM = { 0x47ba000a, 10, 0, 18362, VER_PLATFORM_WIN32_NT, 0, 0 };
+
+VersionLieInfo g_Win2k16RTM = { 0x3fab000a, 10, 0, 16299, VER_PLATFORM_WIN32_NT, 0, 0 };
+VersionLieInfo g_Win2k19RTM = { 0x4563000a, 10, 0, 17763, VER_PLATFORM_WIN32_NT, 0, 0 };
+
/* Fill the OSVERSIONINFO[EX][W|A] struct with the info from the generic VersionLieInfo
*/
BOOL FakeVersion(LPOSVERSIONINFOEXA pResult, VersionLieInfo* pFake)
@@ -171,6 +176,7 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA
lpOsVersionI
#define VERSION_INFO g_WinNT4SP5
#include "versionlie.inl"
+
#define SHIM_NS Win2000VersionLie
#define VERSION_INFO g_Win2000
#include "versionlie.inl"
@@ -235,6 +241,7 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA
lpOsVersionI
#define VERSION_INFO g_Win7SP1
#include "versionlie.inl"
+
#define SHIM_NS Win8RTMVersionLie
#define VERSION_INFO g_Win8RTM
#include "versionlie.inl"
@@ -244,3 +251,16 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA
lpOsVersionI
#include "versionlie.inl"
+#define SHIM_NS Win10RTMVersionLie
+#define VERSION_INFO g_Win10RTM
+#include "versionlie.inl"
+
+
+#define SHIM_NS Win2k16RTMVersionLie
+#define VERSION_INFO g_Win2k16RTM
+#include "versionlie.inl"
+
+
+#define SHIM_NS Win2k19RTMVersionLie
+#define VERSION_INFO g_Win2k19RTM
+#include "versionlie.inl"
diff --git a/dll/shellext/acppage/CLayerUIPropPage.cpp
b/dll/shellext/acppage/CLayerUIPropPage.cpp
index 42c56aa3d53..a02a8d845d4 100644
--- a/dll/shellext/acppage/CLayerUIPropPage.cpp
+++ b/dll/shellext/acppage/CLayerUIPropPage.cpp
@@ -29,17 +29,16 @@ static struct {
{ L"Windows 98/ME", L"WIN98" },
{ L"Windows NT 4.0 (SP5)", L"NT4SP5" },
{ L"Windows 2000", L"WIN2000" },
- { L"Windows XP (SP2)", L"WINXPSP2" },
{ L"Windows XP (SP3)", L"WINXPSP3" },
{ L"Windows Server 2003 (SP1)", L"WINSRV03SP1" },
{ L"Windows Server 2008 (SP1)", L"WINSRV08SP1" },
- { L"Windows Vista", L"VISTARTM" },
- { 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" },
+ { L"Windows 10", L"WIN10RTM" },
+ { L"Windows Server 2016", L"WINSRV16RTM" },
+ { L"Windows Server 2019", L"WINSRV19RTM" },
{ NULL, NULL }
};
@@ -339,7 +338,7 @@ LRESULT CLayerUIPropPage::OnInitDialog(UINT uMsg, WPARAM wParam,
LPARAM lParam,
HWND cboMode = GetDlgItem(IDC_COMPATIBILITYMODE);
for (size_t n = 0; g_CompatModes[n].Display; ++n)
ComboBox_AddString(cboMode, g_CompatModes[n].Display);
- ComboBox_SetCurSel(cboMode, 5);
+ ComboBox_SetCurSel(cboMode, 4);
CStringW explanation;
if (!m_AllowPermLayer)
diff --git a/media/sdb/sysmain.xml b/media/sdb/sysmain.xml
index c41413abde0..c105abadab2 100644
--- a/media/sdb/sysmain.xml
+++ b/media/sdb/sysmain.xml
@@ -200,6 +200,33 @@
<EXCLUDE MODULE="oleaut32.dll" />
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
+ <SHIM NAME="Win10RTMVersionLie">
+ <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="Win2k16RTMVersionLie">
+ <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="Win2k19RTMVersionLie">
+ <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>
<!-- Display mode shims -->
@@ -363,6 +390,24 @@
<DATA NAME="SHIMVERSIONNT" DATA_DWORD="603" />
<!-- TODO: Add more fixes! -->
</LAYER>
+ <LAYER NAME="WIN10RTM">
+ <!-- ReactOS specific. Windows does not have this version lie -->
+ <SHIM_REF NAME="Win10RTMVersionLie" />
+ <DATA NAME="SHIMVERSIONNT" DATA_DWORD="1000" />
+ <!-- TODO: Add more fixes! -->
+ </LAYER>
+ <LAYER NAME="WINSRV16RTM">
+ <!-- ReactOS specific. Windows does not have this version lie -->
+ <SHIM_REF NAME="Win2k16RTMVersionLie" />
+ <DATA NAME="SHIMVERSIONNT" DATA_DWORD="1000" />
+ <!-- TODO: Add more fixes! -->
+ </LAYER>
+ <LAYER NAME="WINSRV19RTM">
+ <!-- ReactOS specific. Windows does not have this version lie -->
+ <SHIM_REF NAME="Win2k19RTMVersionLie" />
+ <DATA NAME="SHIMVERSIONNT" DATA_DWORD="1000" />
+ <!-- TODO: Add more fixes! -->
+ </LAYER>
@@ -424,4 +469,4 @@
<SHIM_REF NAME="ShimTest" />
</EXE>
</DATABASE>
-</SDB>
\ No newline at end of file
+</SDB>
diff --git a/modules/rostests/apitests/appshim/versionlie.c
b/modules/rostests/apitests/appshim/versionlie.c
index f7605f2e7cf..f7244fd01e8 100644
--- a/modules/rostests/apitests/appshim/versionlie.c
+++ b/modules/rostests/apitests/appshim/versionlie.c
@@ -288,6 +288,10 @@ 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 };
+VersionLieInfo g_Win10RTM = { 0x47ba000a, 10, 0, 18362, VER_PLATFORM_WIN32_NT, 0, 0 };
+
+VersionLieInfo g_Win2k16RTM = { 0x3fab000a, 10, 0, 16299, VER_PLATFORM_WIN32_NT, 0, 0 };
+VersionLieInfo g_Win2k19RTM = { 0x4563000a, 10, 0, 17763, VER_PLATFORM_WIN32_NT, 0, 0 };
DWORD get_host_winver(void)
{
@@ -406,4 +410,7 @@ START_TEST(versionlie)
run_test("Win7SP1VersionLie", &g_Win7SP1); /* ReactOS specific.
Windows does not have this version lie */
run_test("Win8RTMVersionLie", &g_Win8RTM);
run_test("Win81RTMVersionLie", &g_Win81RTM);
+ run_test("Win10RTMVersionLie", &g_Win10RTM); /* ReactOS specific.
Windows does not have this version lie */
+ run_test("Win2k16RTMVersionLie", &g_Win2k16RTM); /* ReactOS
specific. Windows does not have this version lie */
+ run_test("Win2k19RTMVersionLie", &g_Win2k19RTM); /* ReactOS
specific. Windows does not have this version lie */
}