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
50a18ca5
Commit
50a18ca5
authored
Nov 10, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Unify SHDeleteKeyW implementation with SHDeleteKeyA.
parent
75dd3534
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
typelib.c
dlls/oleaut32/tests/typelib.c
+0
-2
reg.c
dlls/shlwapi/reg.c
+9
-8
No files found.
dlls/oleaut32/tests/typelib.c
View file @
50a18ca5
...
...
@@ -503,9 +503,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, LPCWSTR base, BOOL
if
(
remove
)
{
todo_wine
{
ok
(
SHDeleteKeyW
(
HKEY_CLASSES_ROOT
,
buf
)
==
ERROR_SUCCESS
,
"SHDeleteKey failed
\n
"
);
}
return
TRUE
;
}
...
...
dlls/shlwapi/reg.c
View file @
50a18ca5
...
...
@@ -1553,7 +1553,7 @@ DWORD WINAPI SHDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
*/
DWORD
WINAPI
SHDeleteKeyW
(
HKEY
hKey
,
LPCWSTR
lpszSubKey
)
{
DWORD
dwRet
,
dw
KeyCount
=
0
,
dwMaxSubkeyLen
=
0
,
dwSize
,
i
;
DWORD
dwRet
,
dw
MaxSubkeyLen
=
0
,
dwSize
;
WCHAR
szNameBuf
[
MAX_PATH
],
*
lpszName
=
szNameBuf
;
HKEY
hSubKey
=
0
;
...
...
@@ -1562,8 +1562,8 @@ DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
dwRet
=
RegOpenKeyExW
(
hKey
,
lpszSubKey
,
0
,
KEY_READ
,
&
hSubKey
);
if
(
!
dwRet
)
{
/* Find
how many subkeys there are
*/
dwRet
=
RegQueryInfoKeyW
(
hSubKey
,
NULL
,
NULL
,
NULL
,
&
dwKeyCount
,
/* Find
the maximum subkey length so that we can allocate a buffer
*/
dwRet
=
RegQueryInfoKeyW
(
hSubKey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwMaxSubkeyLen
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
dwRet
)
{
...
...
@@ -1576,15 +1576,16 @@ DWORD WINAPI SHDeleteKeyW(HKEY hKey, LPCWSTR lpszSubKey)
dwRet
=
ERROR_NOT_ENOUGH_MEMORY
;
else
{
/* Recursively delete all the subkeys */
for
(
i
=
0
;
i
<
dwKeyCount
&&
!
dwRet
;
i
++
)
while
(
dwRet
==
ERROR_SUCCESS
)
{
dwSize
=
dwMaxSubkeyLen
;
dwRet
=
RegEnumKeyExW
(
hSubKey
,
i
,
lpszName
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
!
dwRet
)
dwRet
=
RegEnumKeyExW
(
hSubKey
,
0
,
lpszName
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
dwRet
==
ERROR_SUCCESS
||
dwRet
==
ERROR_MORE_DATA
)
dwRet
=
SHDeleteKeyW
(
hSubKey
,
lpszName
);
}
if
(
dwRet
==
ERROR_NO_MORE_ITEMS
)
dwRet
=
ERROR_SUCCESS
;
if
(
lpszName
!=
szNameBuf
)
HeapFree
(
GetProcessHeap
(),
0
,
lpszName
);
/* Free buffer if allocated */
}
...
...
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