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
aacb511d
Commit
aacb511d
authored
Nov 21, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Nov 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Allow opening HKEY_CLASSES_ROOT subkeys with backslash prefix on NT.
parent
a76d38d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
registry.c
dlls/advapi32/registry.c
+8
-0
registry.c
dlls/advapi32/tests/registry.c
+7
-0
No files found.
dlls/advapi32/registry.c
View file @
aacb511d
...
...
@@ -306,6 +306,9 @@ LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, REGSAM ac
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
/* NT+ allows beginning backslash for HKEY_CLASSES_ROOT */
if
(
hkey
==
HKEY_CLASSES_ROOT
&&
name
&&
*
name
==
'\\'
)
name
++
;
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
attr
.
Length
=
sizeof
(
attr
);
...
...
@@ -346,6 +349,11 @@ LSTATUS WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM acc
NTSTATUS
status
;
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
else
{
/* NT+ allows beginning backslash for HKEY_CLASSES_ROOT */
if
(
hkey
==
HKEY_CLASSES_ROOT
&&
name
&&
*
name
==
'\\'
)
name
++
;
}
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
...
...
dlls/advapi32/tests/registry.c
View file @
aacb511d
...
...
@@ -961,6 +961,13 @@ static void test_reg_open_key(void)
ret
==
ERROR_FILE_NOT_FOUND
/* Win9x,ME */
,
"expected ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d
\n
"
,
ret
);
hkResult
=
NULL
;
ret
=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
"
\\
clsid"
,
0
,
KEY_QUERY_VALUE
,
&
hkResult
);
ok
(
ret
==
ERROR_SUCCESS
||
/* NT/2k/XP */
ret
==
ERROR_FILE_NOT_FOUND
/* Win9x,ME */
,
"expected ERROR_SUCCESS or ERROR_FILE_NOT_FOUND, got %d
\n
"
,
ret
);
RegCloseKey
(
hkResult
);
/* WOW64 flags */
hkResult
=
NULL
;
ret
=
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software"
,
0
,
KEY_READ
|
KEY_WOW64_32KEY
,
&
hkResult
);
...
...
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