Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e8d1e2f7
Commit
e8d1e2f7
authored
Feb 25, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Feb 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RegOpen/CloseKey.
parent
541e14f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
registry.c
dlls/advapi32/registry.c
+11
-11
registry.c
dlls/advapi32/tests/registry.c
+1
-1
No files found.
dlls/advapi32/registry.c
View file @
e8d1e2f7
...
...
@@ -277,11 +277,6 @@ DWORD WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, REGSAM acce
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
if
(
!
name
||
!*
name
)
{
*
retkey
=
hkey
;
return
ERROR_SUCCESS
;
}
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
attr
.
Length
=
sizeof
(
attr
);
...
...
@@ -321,11 +316,6 @@ DWORD WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM acces
STRING
nameA
;
NTSTATUS
status
;
if
(
!
name
||
!*
name
)
{
*
retkey
=
hkey
;
return
ERROR_SUCCESS
;
}
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
...
...
@@ -354,6 +344,11 @@ DWORD WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM acces
*/
DWORD
WINAPI
RegOpenKeyW
(
HKEY
hkey
,
LPCWSTR
name
,
PHKEY
retkey
)
{
if
(
!
name
||
!*
name
)
{
*
retkey
=
hkey
;
return
ERROR_SUCCESS
;
}
return
RegOpenKeyExW
(
hkey
,
name
,
0
,
KEY_ALL_ACCESS
,
retkey
);
}
...
...
@@ -374,6 +369,11 @@ DWORD WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR name, PHKEY retkey )
*/
DWORD
WINAPI
RegOpenKeyA
(
HKEY
hkey
,
LPCSTR
name
,
PHKEY
retkey
)
{
if
(
!
name
||
!*
name
)
{
*
retkey
=
hkey
;
return
ERROR_SUCCESS
;
}
return
RegOpenKeyExA
(
hkey
,
name
,
0
,
KEY_ALL_ACCESS
,
retkey
);
}
...
...
@@ -855,7 +855,7 @@ DWORD WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDWOR
*/
DWORD
WINAPI
RegCloseKey
(
HKEY
hkey
)
{
if
(
!
hkey
)
return
ERROR_INVALID_
PARAMETER
;
if
(
!
hkey
)
return
ERROR_INVALID_
HANDLE
;
if
(
hkey
>=
(
HKEY
)
0x80000000
)
return
ERROR_SUCCESS
;
return
RtlNtStatusToDosError
(
NtClose
(
hkey
)
);
}
...
...
dlls/advapi32/tests/registry.c
View file @
e8d1e2f7
...
...
@@ -341,7 +341,7 @@ static void test_reg_close_key()
/* try to close a NULL handle */
ret
=
RegCloseKey
(
NULL
);
ok
(
ret
==
ERROR_INVALID_
PARAMETER
,
"expected ERROR_INVALID_PARAMETER
, got %ld
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_
HANDLE
,
"expected ERROR_INVALID_HANDLE
, got %ld
\n
"
,
ret
);
}
START_TEST
(
registry
)
...
...
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