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
da00742a
Commit
da00742a
authored
Jun 14, 2002
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented recursive RegDeleteKey in Win95 emulation.
parent
49467be6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
registry.c
dlls/advapi32/registry.c
+32
-4
No files found.
dlls/advapi32/registry.c
View file @
da00742a
...
@@ -605,12 +605,26 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
...
@@ -605,12 +605,26 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
DWORD
ret
;
DWORD
ret
;
HKEY
tmp
;
HKEY
tmp
;
if
(
!
name
||
!*
name
)
return
NtDeleteKey
(
hkey
);
if
(
!
name
||
!*
name
)
if
(
!
(
ret
=
RegOpenKeyExW
(
hkey
,
name
,
0
,
0
,
&
tmp
)))
{
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
hkey
)
);
}
else
if
(
!
(
ret
=
RegOpenKeyExW
(
hkey
,
name
,
0
,
0
,
&
tmp
)))
{
if
(
!
is_version_nt
())
/* win95 does recursive key deletes */
{
WCHAR
name
[
MAX_PATH
];
while
(
!
RegEnumKeyW
(
tmp
,
0
,
name
,
sizeof
name
))
{
if
(
RegDeleteKeyW
(
tmp
,
name
))
/* recurse */
break
;
}
}
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
tmp
)
);
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
tmp
)
);
RegCloseKey
(
tmp
);
RegCloseKey
(
tmp
);
}
}
TRACE
(
"%s ret=%08lx
\n
"
,
debugstr_w
(
name
),
ret
);
return
ret
;
return
ret
;
}
}
...
@@ -623,12 +637,26 @@ DWORD WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
...
@@ -623,12 +637,26 @@ DWORD WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
DWORD
ret
;
DWORD
ret
;
HKEY
tmp
;
HKEY
tmp
;
if
(
!
name
||
!*
name
)
return
NtDeleteKey
(
hkey
);
if
(
!
name
||
!*
name
)
if
(
!
(
ret
=
RegOpenKeyExA
(
hkey
,
name
,
0
,
0
,
&
tmp
)))
{
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
hkey
)
);
}
else
if
(
!
(
ret
=
RegOpenKeyExA
(
hkey
,
name
,
0
,
KEY_ALL_ACCESS
,
&
tmp
)))
{
if
(
!
is_version_nt
())
/* win95 does recursive key deletes */
{
CHAR
name
[
MAX_PATH
];
while
(
!
RegEnumKeyA
(
tmp
,
0
,
name
,
sizeof
name
))
{
if
(
RegDeleteKeyA
(
tmp
,
name
))
/* recurse */
break
;
}
}
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
tmp
)
);
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
tmp
)
);
RegCloseKey
(
tmp
);
RegCloseKey
(
tmp
);
}
}
TRACE
(
"%s ret=%08lx
\n
"
,
debugstr_a
(
name
),
ret
);
return
ret
;
return
ret
;
}
}
...
...
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