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
df77e490
Commit
df77e490
authored
Apr 05, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fix return value of RegNotifyChangeKeyValue for pending events.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d2ca5419
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
registry.c
dlls/advapi32/registry.c
+1
-1
registry.c
dlls/advapi32/tests/registry.c
+28
-0
No files found.
dlls/advapi32/registry.c
View file @
df77e490
...
...
@@ -2760,7 +2760,7 @@ LSTATUS WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
fdwNotifyFilter
,
fWatchSubTree
,
NULL
,
0
,
fAsync
);
if
(
status
&&
status
!=
STATUS_
TIMEOUT
)
if
(
status
&&
status
!=
STATUS_
PENDING
)
return
RtlNtStatusToDosError
(
status
);
return
ERROR_SUCCESS
;
...
...
dlls/advapi32/tests/registry.c
View file @
df77e490
...
...
@@ -3452,6 +3452,33 @@ static void test_RegOpenCurrentUser(void)
RegCloseKey
(
key
);
}
static
void
test_RegNotifyChangeKeyValue
(
void
)
{
HKEY
key
,
subkey
;
HANDLE
event
;
DWORD
dwret
;
LONG
ret
;
event
=
CreateEventW
(
NULL
,
FALSE
,
TRUE
,
NULL
);
ok
(
event
!=
NULL
,
"CreateEvent failed, error %u
\n
"
,
GetLastError
());
ret
=
RegCreateKeyA
(
hkey_main
,
"TestKey"
,
&
key
);
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
ret
=
RegNotifyChangeKeyValue
(
key
,
TRUE
,
REG_NOTIFY_CHANGE_NAME
,
event
,
TRUE
);
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
dwret
=
WaitForSingleObject
(
event
,
0
);
ok
(
dwret
==
WAIT_TIMEOUT
,
"expected WAIT_TIMEOUT, got %u
\n
"
,
dwret
);
ret
=
RegCreateKeyA
(
key
,
"SubKey"
,
&
subkey
);
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
ret
);
dwret
=
WaitForSingleObject
(
event
,
0
);
ok
(
dwret
==
WAIT_OBJECT_0
,
"expected WAIT_OBJECT_0, got %u
\n
"
,
dwret
);
RegDeleteKeyA
(
key
,
""
);
RegCloseKey
(
key
);
CloseHandle
(
event
);
}
START_TEST
(
registry
)
{
/* Load pointers for functions that are not available in all Windows versions */
...
...
@@ -3486,6 +3513,7 @@ START_TEST(registry)
test_delete_value
();
test_delete_key_value
();
test_RegOpenCurrentUser
();
test_RegNotifyChangeKeyValue
();
/* cleanup */
delete_key
(
hkey_main
);
...
...
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