Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
0fec65d6
Commit
0fec65d6
authored
20 years ago
by
James Hawkins
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use SHDeleteKey to remove leftover keys from the shreg tests.
parent
b98b7dd6
No related branches found
Branches containing commit
Tags
wine-970914
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shlwapi/tests/shreg.c
+14
-16
14 additions, 16 deletions
dlls/shlwapi/tests/shreg.c
with
14 additions
and
16 deletions
dlls/shlwapi/tests/shreg.c
+
14
−
16
View file @
0fec65d6
...
...
@@ -51,24 +51,22 @@ static unsigned sExpLen2;
static
const
char
*
sEmptyBuffer
=
"0123456789"
;
/* delete key and all its subkeys */
static
DWORD
delete_key
(
HKEY
hkey
)
static
DWORD
delete_key
(
HKEY
hkey
,
LPSTR
parent
,
LPSTR
keyname
)
{
WCHAR
name
[
MAX_PATH
]
;
HKEY
parentKey
;
DWORD
ret
;
while
(
!
(
ret
=
RegEnumKeyW
(
hkey
,
0
,
name
,
sizeof
(
name
))))
{
HKEY
tmp
;
if
(
!
(
ret
=
RegOpenKeyExW
(
hkey
,
name
,
0
,
KEY_ENUMERATE_SUB_KEYS
,
&
tmp
)))
{
ret
=
delete_key
(
tmp
);
RegCloseKey
(
tmp
);
}
if
(
ret
)
break
;
}
if
(
ret
!=
ERROR_NO_MORE_ITEMS
)
return
ret
;
RegDeleteKeyA
(
hkey
,
NULL
);
return
0
;
RegCloseKey
(
hkey
);
/* open the parent of the key to close */
ret
=
RegOpenKeyEx
(
HKEY_CURRENT_USER
,
parent
,
0
,
KEY_ALL_ACCESS
,
&
parentKey
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
ret
=
SHDeleteKey
(
parentKey
,
keyname
);
RegCloseKey
(
parentKey
);
return
ret
;
}
static
HKEY
create_test_entries
(
void
)
...
...
@@ -321,5 +319,5 @@ START_TEST(shreg)
test_SHGetRegPath
();
test_SHCopyKey
();
test_SHDeleteKey
();
delete_key
(
hkey
);
delete_key
(
hkey
,
"Software
\\
Wine"
,
"Test"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment