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
a9d5de84
Commit
a9d5de84
authored
Apr 16, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Apr 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RegDeleteKey fails if the lpSubKey param is NULL.
parent
13578c86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
registry.c
dlls/advapi32/registry.c
+6
-2
registry.c
dlls/advapi32/tests/registry.c
+9
-0
No files found.
dlls/advapi32/registry.c
View file @
a9d5de84
...
...
@@ -871,9 +871,11 @@ DWORD WINAPI RegDeleteKeyW( HKEY hkey, LPCWSTR name )
DWORD
ret
;
HKEY
tmp
;
if
(
!
name
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
if
(
!
name
||
!
*
name
)
if
(
!*
name
)
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
hkey
)
);
}
...
...
@@ -905,9 +907,11 @@ DWORD WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
DWORD
ret
;
HKEY
tmp
;
if
(
!
name
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
if
(
!
name
||
!
*
name
)
if
(
!*
name
)
{
ret
=
RtlNtStatusToDosError
(
NtDeleteKey
(
hkey
)
);
}
...
...
dlls/advapi32/tests/registry.c
View file @
a9d5de84
...
...
@@ -352,6 +352,14 @@ static void test_reg_close_key()
"expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %ld
\n
"
,
ret
);
}
static
void
test_reg_delete_key
()
{
DWORD
ret
;
ret
=
RegDeleteKey
(
hkey_main
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %ld
\n
"
,
ret
);
}
static
void
test_reg_save_key
()
{
DWORD
ret
;
...
...
@@ -385,6 +393,7 @@ START_TEST(registry)
test_query_value_ex
();
test_reg_open_key
();
test_reg_close_key
();
test_reg_delete_key
();
test_reg_save_key
();
test_reg_load_key
();
...
...
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