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
7c0ba900
Commit
7c0ba900
authored
Mar 21, 2020
by
Serge Gautherie
Committed by
Alexandre Julliard
Mar 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Handle RegGetValue() RRF_SUBKEY_WOW64??KEY flags.
Signed-off-by:
Serge Gautherie
<
winehq-git_serge_180711@gautherie.fr
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
27d1ef75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
registry.c
dlls/kernelbase/registry.c
+20
-2
winreg.h
include/winreg.h
+3
-0
No files found.
dlls/kernelbase/registry.c
View file @
7c0ba900
...
...
@@ -1699,13 +1699,22 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
if
(
pvData
&&
!
pcbData
)
return
ERROR_INVALID_PARAMETER
;
if
((
dwFlags
&
RRF_RT_REG_EXPAND_SZ
)
&&
!
(
dwFlags
&
RRF_NOEXPAND
)
&&
((
dwFlags
&
RRF_RT_ANY
)
!=
RRF_RT_ANY
))
return
ERROR_INVALID_PARAMETER
;
if
((
dwFlags
&
RRF_WOW64_MASK
)
==
RRF_WOW64_MASK
)
return
ERROR_INVALID_PARAMETER
;
if
(
pszSubKey
&&
pszSubKey
[
0
])
{
ret
=
RegOpenKeyExW
(
hKey
,
pszSubKey
,
0
,
KEY_QUERY_VALUE
,
&
hKey
);
REGSAM
samDesired
=
KEY_QUERY_VALUE
;
if
(
dwFlags
&
RRF_WOW64_MASK
)
samDesired
|=
(
dwFlags
&
RRF_SUBKEY_WOW6432KEY
)
?
KEY_WOW64_32KEY
:
KEY_WOW64_64KEY
;
ret
=
RegOpenKeyExW
(
hKey
,
pszSubKey
,
0
,
samDesired
,
&
hKey
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
}
...
...
@@ -1795,13 +1804,22 @@ LSTATUS WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
if
(
pvData
&&
!
pcbData
)
return
ERROR_INVALID_PARAMETER
;
if
((
dwFlags
&
RRF_RT_REG_EXPAND_SZ
)
&&
!
(
dwFlags
&
RRF_NOEXPAND
)
&&
((
dwFlags
&
RRF_RT_ANY
)
!=
RRF_RT_ANY
))
return
ERROR_INVALID_PARAMETER
;
if
((
dwFlags
&
RRF_WOW64_MASK
)
==
RRF_WOW64_MASK
)
return
ERROR_INVALID_PARAMETER
;
if
(
pszSubKey
&&
pszSubKey
[
0
])
{
ret
=
RegOpenKeyExA
(
hKey
,
pszSubKey
,
0
,
KEY_QUERY_VALUE
,
&
hKey
);
REGSAM
samDesired
=
KEY_QUERY_VALUE
;
if
(
dwFlags
&
RRF_WOW64_MASK
)
samDesired
|=
(
dwFlags
&
RRF_SUBKEY_WOW6432KEY
)
?
KEY_WOW64_32KEY
:
KEY_WOW64_64KEY
;
ret
=
RegOpenKeyExA
(
hKey
,
pszSubKey
,
0
,
samDesired
,
&
hKey
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
}
...
...
include/winreg.h
View file @
7c0ba900
...
...
@@ -81,6 +81,9 @@ typedef LONG LSTATUS;
#define RRF_RT_DWORD (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD)
#define RRF_RT_QWORD (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD)
#define RRF_RT_ANY 0xffff
#define RRF_SUBKEY_WOW6464KEY (1 << 16)
#define RRF_SUBKEY_WOW6432KEY (1 << 17)
#define RRF_WOW64_MASK (RRF_SUBKEY_WOW6432KEY | RRF_SUBKEY_WOW6464KEY)
#define RRF_NOEXPAND (1 << 28)
#define RRF_ZEROONFAILURE (1 << 29)
...
...
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