https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f4d2571b7e191883b789f…
commit f4d2571b7e191883b789f2d92693c4f1d41905b2
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 19:08:27 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:27 2022 +0100
[WINESYNC] msi: Report the real NT version number up to 6.3.
MSI always reports 6.3 even without a manifest, but does not report anything
higher.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48959
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 658183a803fced017e1e29f4001cec8b48748327 by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/custom.c | 6 ++++++
dll/win32/msi/package.c | 19 ++++++++++++++++---
dll/win32/msi/precomp.h | 3 +++
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c
index 55504c2c737..8753a60a279 100644
--- a/dll/win32/msi/custom.c
+++ b/dll/win32/msi/custom.c
@@ -38,6 +38,12 @@
#include "wine/unicode.h"
#include "wine/exception.h"
+#ifdef __REACTOS__
+#ifndef STATUS_ACCESS_VIOLATION
+#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005)
+#endif
+#endif
+
WINE_DEFAULT_DEBUG_CHANNEL(msi);
#define CUSTOM_ACTION_TYPE_MASK 0x3F
diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c
index 4390a709ece..cd8977724ce 100644
--- a/dll/win32/msi/package.c
+++ b/dll/win32/msi/package.c
@@ -21,12 +21,20 @@
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define COBJMACROS
+#ifdef __REACTOS__
+#define WIN32_NO_STATUS
+#endif
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
+#ifdef __REACTOS__
+#include <ndk/rtlfuncs.h>
+#else
+#include "winternl.h"
+#endif
#include "shlwapi.h"
#include "wingdi.h"
#include "msi.h"
@@ -668,7 +676,7 @@ done:
static VOID set_installer_properties(MSIPACKAGE *package)
{
WCHAR *ptr;
- OSVERSIONINFOEXW OSVersion;
+ RTL_OSVERSIONINFOEXW OSVersion;
MEMORYSTATUSEX msex;
DWORD verval, len, type;
WCHAR pth[MAX_PATH], verstr[11], bufstr[22];
@@ -860,9 +868,14 @@ static VOID set_installer_properties(MSIPACKAGE *package)
msi_set_property( package->db, szPrivileged, szOne, -1 );
/* set the os things */
- OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
- GetVersionExW((OSVERSIONINFOW *)&OSVersion);
+ OSVersion.dwOSVersionInfoSize = sizeof(OSVersion);
+ RtlGetVersion((PRTL_OSVERSIONINFOW)&OSVersion);
verval = OSVersion.dwMinorVersion + OSVersion.dwMajorVersion * 100;
+ if (verval > 603)
+ {
+ verval = 603;
+ OSVersion.dwBuildNumber = 9600;
+ }
len = swprintf( verstr, ARRAY_SIZE(verstr), szFormat, verval );
switch (OSVersion.dwPlatformId)
{
diff --git a/dll/win32/msi/precomp.h b/dll/win32/msi/precomp.h
index f4951c71ee1..47defd80631 100644
--- a/dll/win32/msi/precomp.h
+++ b/dll/win32/msi/precomp.h
@@ -8,6 +8,9 @@
#define _INC_WINDOWS
#define COM_NO_WINDOWS_H
+#ifdef __REACTOS__
+#define WIN32_NO_STATUS
+#endif
#define COBJMACROS
#define NONAMELESSUNION