Skip to content

Commit f4d2571

Browse files
winesynclearn-more
authored andcommitted
[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 <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 658183a803fced017e1e29f4001cec8b48748327 by Zebediah Figura <[email protected]>
1 parent ba60287 commit f4d2571

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

dll/win32/msi/custom.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838
#include "wine/unicode.h"
3939
#include "wine/exception.h"
4040

41+
#ifdef __REACTOS__
42+
#ifndef STATUS_ACCESS_VIOLATION
43+
#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005)
44+
#endif
45+
#endif
46+
4147
WINE_DEFAULT_DEBUG_CHANNEL(msi);
4248

4349
#define CUSTOM_ACTION_TYPE_MASK 0x3F

dll/win32/msi/package.c

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,20 @@
2121
#define NONAMELESSUNION
2222
#define NONAMELESSSTRUCT
2323
#define COBJMACROS
24+
#ifdef __REACTOS__
25+
#define WIN32_NO_STATUS
26+
#endif
2427

2528
#include <stdarg.h>
2629
#include "windef.h"
2730
#include "winbase.h"
2831
#include "winreg.h"
2932
#include "winnls.h"
33+
#ifdef __REACTOS__
34+
#include <ndk/rtlfuncs.h>
35+
#else
36+
#include "winternl.h"
37+
#endif
3038
#include "shlwapi.h"
3139
#include "wingdi.h"
3240
#include "msi.h"
@@ -668,7 +676,7 @@ static void set_msi_assembly_prop(MSIPACKAGE *package)
668676
static VOID set_installer_properties(MSIPACKAGE *package)
669677
{
670678
WCHAR *ptr;
671-
OSVERSIONINFOEXW OSVersion;
679+
RTL_OSVERSIONINFOEXW OSVersion;
672680
MEMORYSTATUSEX msex;
673681
DWORD verval, len, type;
674682
WCHAR pth[MAX_PATH], verstr[11], bufstr[22];
@@ -860,9 +868,14 @@ static VOID set_installer_properties(MSIPACKAGE *package)
860868
msi_set_property( package->db, szPrivileged, szOne, -1 );
861869

862870
/* set the os things */
863-
OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
864-
GetVersionExW((OSVERSIONINFOW *)&OSVersion);
871+
OSVersion.dwOSVersionInfoSize = sizeof(OSVersion);
872+
RtlGetVersion((PRTL_OSVERSIONINFOW)&OSVersion);
865873
verval = OSVersion.dwMinorVersion + OSVersion.dwMajorVersion * 100;
874+
if (verval > 603)
875+
{
876+
verval = 603;
877+
OSVersion.dwBuildNumber = 9600;
878+
}
866879
len = swprintf( verstr, ARRAY_SIZE(verstr), szFormat, verval );
867880
switch (OSVersion.dwPlatformId)
868881
{

dll/win32/msi/precomp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
#define _INC_WINDOWS
1010
#define COM_NO_WINDOWS_H
11+
#ifdef __REACTOS__
12+
#define WIN32_NO_STATUS
13+
#endif
1114

1215
#define COBJMACROS
1316
#define NONAMELESSUNION

0 commit comments

Comments
 (0)