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
7d66a01f
Commit
7d66a01f
authored
Nov 09, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Return STATUS_PENDING in NtNotifyChangeKey if async notify is performed.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd785109
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
reg.c
dlls/ntdll/reg.c
+3
-3
reg.c
dlls/ntdll/tests/reg.c
+24
-2
registry.c
server/registry.c
+2
-0
No files found.
dlls/ntdll/reg.c
View file @
7d66a01f
...
...
@@ -678,12 +678,12 @@ NTSTATUS WINAPI NtNotifyChangeKey(
if
(
!
Asynchronous
)
{
if
(
ret
==
STATUS_
SUCCESS
)
NtWaitForSingleObject
(
Event
,
FALSE
,
NULL
);
if
(
ret
==
STATUS_
PENDING
)
ret
=
NtWaitForSingleObject
(
Event
,
FALSE
,
NULL
);
NtClose
(
Event
);
}
return
STATUS_SUCCESS
;
return
ret
;
}
/******************************************************************************
...
...
dlls/ntdll/tests/reg.c
View file @
7d66a01f
...
...
@@ -147,6 +147,7 @@ static LPVOID (WINAPI * pRtlAllocateHeap)(PVOID,ULONG,ULONG);
static
NTSTATUS
(
WINAPI
*
pRtlZeroMemory
)(
PVOID
,
ULONG
);
static
NTSTATUS
(
WINAPI
*
pRtlpNtQueryValueKey
)(
HANDLE
,
ULONG
*
,
PBYTE
,
DWORD
*
,
void
*
);
static
NTSTATUS
(
WINAPI
*
pNtNotifyChangeKey
)(
HANDLE
,
HANDLE
,
PIO_APC_ROUTINE
,
PVOID
,
PIO_STATUS_BLOCK
,
ULONG
,
BOOLEAN
,
PVOID
,
ULONG
,
BOOLEAN
);
static
NTSTATUS
(
WINAPI
*
pNtWaitForSingleObject
)(
HANDLE
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
static
HMODULE
hntdll
=
0
;
static
int
CurrentTest
=
0
;
...
...
@@ -195,6 +196,7 @@ static BOOL InitFunctionPtrs(void)
NTDLL_GET_PROC
(
RtlZeroMemory
)
NTDLL_GET_PROC
(
RtlpNtQueryValueKey
)
NTDLL_GET_PROC
(
RtlOpenCurrentUser
)
NTDLL_GET_PROC
(
NtWaitForSingleObject
)
/* optional functions */
pNtQueryLicenseValue
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQueryLicenseValue"
);
...
...
@@ -1507,9 +1509,11 @@ static void test_NtQueryKey(void)
static
void
test_notify
(
void
)
{
OBJECT_ATTRIBUTES
attr
;
LARGE_INTEGER
timeout
;
IO_STATUS_BLOCK
iosb
;
UNICODE_STRING
str
;
HANDLE
key
,
event
,
subkey
;
NTSTATUS
status
;
HANDLE
key
,
event
;
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
...
...
@@ -1520,7 +1524,25 @@ static void test_notify(void)
ok
(
event
!=
NULL
,
"CreateEvent failed: %u
\n
"
,
GetLastError
());
status
=
pNtNotifyChangeKey
(
key
,
event
,
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
todo_wine
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
ok
(
status
==
STATUS_PENDING
,
"NtNotifyChangeKey returned %x
\n
"
,
status
);
timeout
.
QuadPart
=
0
;
status
=
pNtWaitForSingleObject
(
event
,
FALSE
,
&
timeout
);
ok
(
status
==
STATUS_TIMEOUT
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
attr
.
RootDirectory
=
key
;
attr
.
ObjectName
=
&
str
;
pRtlCreateUnicodeStringFromAsciiz
(
&
str
,
"test_subkey"
);
status
=
pNtCreateKey
(
&
subkey
,
GENERIC_ALL
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08x
\n
"
,
status
);
status
=
pNtWaitForSingleObject
(
event
,
FALSE
,
&
timeout
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtWaitForSingleObject returned %x
\n
"
,
status
);
status
=
pNtDeleteKey
(
subkey
);
ok
(
status
==
STATUS_SUCCESS
,
"NtDeleteSubkey failed: %x
\n
"
,
status
);
pNtClose
(
subkey
);
pNtClose
(
key
);
pNtClose
(
event
);
...
...
server/registry.c
View file @
7d66a01f
...
...
@@ -2289,6 +2289,8 @@ DECL_HANDLER(set_registry_notification)
list_add_head
(
&
key
->
notify_list
,
&
notify
->
entry
);
}
}
if
(
notify
)
set_error
(
STATUS_PENDING
);
release_object
(
event
);
}
release_object
(
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