Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0692d07f
Commit
0692d07f
authored
Feb 09, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Look at CurrentMajor/MinorVersionNumber registry values before CurrentVersion.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54463
parent
65a3e149
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
+27
-9
version.c
dlls/ntdll/version.c
+27
-9
No files found.
dlls/ntdll/version.c
View file @
0692d07f
...
...
@@ -276,18 +276,36 @@ static BOOL get_nt_registry_version( RTL_OSVERSIONINFOEXW *version )
memset
(
version
,
0
,
sizeof
(
*
version
)
);
RtlInitUnicodeString
(
&
valueW
,
L"CurrentVersion"
);
if
(
!
NtQueryValueKey
(
hkey
,
&
valueW
,
KeyValuePartialInformation
,
tmp
,
sizeof
(
tmp
)
-
1
,
&
count
))
RtlInitUnicodeString
(
&
valueW
,
L"CurrentMajorVersionNumber"
);
if
(
!
NtQueryValueKey
(
hkey
,
&
valueW
,
KeyValuePartialInformation
,
tmp
,
sizeof
(
tmp
)
-
1
,
&
count
)
&&
info
->
Type
==
REG_DWORD
)
{
WCHAR
*
p
,
*
str
=
(
WCHAR
*
)
info
->
Data
;
str
[
info
->
DataLength
/
sizeof
(
WCHAR
)]
=
0
;
p
=
wcschr
(
str
,
'.'
);
if
(
p
)
version
->
dwMajorVersion
=
*
(
DWORD
*
)
info
->
Data
;
RtlInitUnicodeString
(
&
valueW
,
L"CurrentMinorVersionNumber"
);
if
(
!
NtQueryValueKey
(
hkey
,
&
valueW
,
KeyValuePartialInformation
,
tmp
,
sizeof
(
tmp
)
-
1
,
&
count
)
&&
info
->
Type
==
REG_DWORD
)
{
*
p
++
=
0
;
version
->
dwMinorVersion
=
wcstoul
(
p
,
NULL
,
10
);
version
->
dwMinorVersion
=
*
(
DWORD
*
)
info
->
Data
;
}
else
version
->
dwMajorVersion
=
0
;
}
if
(
!
version
->
dwMajorVersion
)
{
RtlInitUnicodeString
(
&
valueW
,
L"CurrentVersion"
);
if
(
!
NtQueryValueKey
(
hkey
,
&
valueW
,
KeyValuePartialInformation
,
tmp
,
sizeof
(
tmp
)
-
1
,
&
count
))
{
WCHAR
*
p
,
*
str
=
(
WCHAR
*
)
info
->
Data
;
str
[
info
->
DataLength
/
sizeof
(
WCHAR
)]
=
0
;
p
=
wcschr
(
str
,
'.'
);
if
(
p
)
{
*
p
++
=
0
;
version
->
dwMinorVersion
=
wcstoul
(
p
,
NULL
,
10
);
}
version
->
dwMajorVersion
=
wcstoul
(
str
,
NULL
,
10
);
}
version
->
dwMajorVersion
=
wcstoul
(
str
,
NULL
,
10
);
}
if
(
version
->
dwMajorVersion
)
/* we got the main version, now fetch the other fields */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment