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
45d47c42
Commit
45d47c42
authored
May 05, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
May 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RegDeleteKey{A,W} to open the specified key with the DELETE access
right.
parent
b12ad3ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
registry.c
dlls/advapi32/registry.c
+7
-10
No files found.
dlls/advapi32/registry.c
View file @
45d47c42
...
...
@@ -875,11 +875,7 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
if
(
!*
name
)
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
hkey
)
);
}
else
if
(
!
(
ret
=
RegOpenKeyExW
(
hkey
,
name
,
0
,
KEY_ENUMERATE_SUB_KEYS
,
&
tmp
)))
if
(
!
(
ret
=
RegOpenKeyExW
(
hkey
,
name
,
0
,
DELETE
,
&
tmp
)))
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
tmp
)
);
RegCloseKey
(
tmp
);
...
...
@@ -898,6 +894,11 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
* hkey [I] Handle to parent key containing the key to delete
* name [I] Name of the key user hkey to delete
*
* NOTES
*
* MSDN is wrong when it says that hkey must be opened with the DELETE access
* right. In reality, it opens a new handle with DELETE access.
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: Error code
...
...
@@ -911,11 +912,7 @@ DWORD WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
if
(
!*
name
)
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
hkey
)
);
}
else
if
(
!
(
ret
=
RegOpenKeyExA
(
hkey
,
name
,
0
,
KEY_ENUMERATE_SUB_KEYS
,
&
tmp
)))
if
(
!
(
ret
=
RegOpenKeyExA
(
hkey
,
name
,
0
,
DELETE
,
&
tmp
)))
{
if
(
!
is_version_nt
())
/* win95 does recursive key deletes */
{
...
...
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