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
7bd852c6
Commit
7bd852c6
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: Added NtNotifyChangeMultipleKeys implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e0d51609
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
20 deletions
+77
-20
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-2
reg.c
dlls/ntdll/reg.c
+39
-16
reg.c
dlls/ntdll/tests/reg.c
+36
-2
No files found.
dlls/ntdll/ntdll.spec
View file @
7bd852c6
...
...
@@ -205,7 +205,7 @@
# @ stub NtModifyBootEntry
@ stdcall NtNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long)
@ stdcall NtNotifyChangeKey(long long ptr ptr ptr long long ptr long long)
# @ stub NtNotifyChangeMultipleKeys
@ stdcall NtNotifyChangeMultipleKeys(long long ptr long ptr ptr ptr long long ptr long long)
@ stdcall NtOpenDirectoryObject(long long long)
@ stdcall NtOpenEvent(long long long)
@ stub NtOpenEventPair
...
...
@@ -1121,7 +1121,7 @@
# @ stub ZwModifyBootEntry
@ stdcall ZwNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) NtNotifyChangeDirectoryFile
@ stdcall ZwNotifyChangeKey(long long ptr ptr ptr long long ptr long long) NtNotifyChangeKey
# @ stub Zw
NotifyChangeMultipleKeys
@ stdcall ZwNotifyChangeMultipleKeys(long long ptr long ptr ptr ptr long long ptr long long) Nt
NotifyChangeMultipleKeys
@ stdcall ZwOpenDirectoryObject(long long long) NtOpenDirectoryObject
@ stdcall ZwOpenEvent(long long long) NtOpenEvent
@ stub ZwOpenEventPair
...
...
dlls/ntdll/reg.c
View file @
7bd852c6
...
...
@@ -633,28 +633,30 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil
}
/******************************************************************************
* NtNotifyChange
Key
[NTDLL.@]
* ZwNotifyChange
Key
[NTDLL.@]
* NtNotifyChange
MultipleKeys
[NTDLL.@]
* ZwNotifyChange
MultipleKeys
[NTDLL.@]
*/
NTSTATUS
WINAPI
NtNotifyChangeKey
(
IN
HANDLE
KeyHandle
,
IN
HANDLE
Event
,
IN
PIO_APC_ROUTINE
ApcRoutine
OPTIONAL
,
IN
PVOID
ApcContext
OPTIONAL
,
OUT
PIO_STATUS_BLOCK
IoStatusBlock
,
IN
ULONG
CompletionFilter
,
IN
BOOLEAN
WatchSubtree
,
OUT
PVOID
ChangeBuffer
,
IN
ULONG
Length
,
IN
BOOLEAN
Asynchronous
)
NTSTATUS
WINAPI
NtNotifyChangeMultipleKeys
(
HANDLE
KeyHandle
,
ULONG
Count
,
OBJECT_ATTRIBUTES
*
SubordinateObjects
,
HANDLE
Event
,
PIO_APC_ROUTINE
ApcRoutine
,
PVOID
ApcContext
,
PIO_STATUS_BLOCK
IoStatusBlock
,
ULONG
CompletionFilter
,
BOOLEAN
WatchSubtree
,
PVOID
ChangeBuffer
,
ULONG
Length
,
BOOLEAN
Asynchronous
)
{
NTSTATUS
ret
;
TRACE
(
"(%p,%p,%p,%p,%p,0x%08x, 0x%08x,%p,0x%08x,0x%08x)
\n
"
,
KeyHandle
,
Event
,
ApcRoutine
,
ApcContext
,
IoStatusBlock
,
CompletionFilter
,
TRACE
(
"(%p,%
u,%p,%
p,%p,%p,%p,0x%08x, 0x%08x,%p,0x%08x,0x%08x)
\n
"
,
KeyHandle
,
Count
,
SubordinateObjects
,
Event
,
ApcRoutine
,
ApcContext
,
IoStatusBlock
,
CompletionFilter
,
Asynchronous
,
ChangeBuffer
,
Length
,
WatchSubtree
);
if
(
ApcRoutine
||
ApcContext
||
ChangeBuffer
||
Length
)
if
(
Count
||
SubordinateObjects
||
ApcRoutine
||
ApcContext
||
ChangeBuffer
||
Length
)
FIXME
(
"Unimplemented optional parameter
\n
"
);
if
(
!
Asynchronous
)
...
...
@@ -687,6 +689,27 @@ NTSTATUS WINAPI NtNotifyChangeKey(
}
/******************************************************************************
* NtNotifyChangeKey [NTDLL.@]
* ZwNotifyChangeKey [NTDLL.@]
*/
NTSTATUS
WINAPI
NtNotifyChangeKey
(
IN
HANDLE
KeyHandle
,
IN
HANDLE
Event
,
IN
PIO_APC_ROUTINE
ApcRoutine
OPTIONAL
,
IN
PVOID
ApcContext
OPTIONAL
,
OUT
PIO_STATUS_BLOCK
IoStatusBlock
,
IN
ULONG
CompletionFilter
,
IN
BOOLEAN
WatchSubtree
,
OUT
PVOID
ChangeBuffer
,
IN
ULONG
Length
,
IN
BOOLEAN
Asynchronous
)
{
return
NtNotifyChangeMultipleKeys
(
KeyHandle
,
0
,
NULL
,
Event
,
ApcRoutine
,
ApcContext
,
IoStatusBlock
,
CompletionFilter
,
WatchSubtree
,
ChangeBuffer
,
Length
,
Asynchronous
);
}
/******************************************************************************
* NtQueryMultipleValueKey [NTDLL]
* ZwQueryMultipleValueKey
*/
...
...
dlls/ntdll/tests/reg.c
View file @
7bd852c6
...
...
@@ -147,6 +147,8 @@ 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
*
pNtNotifyChangeMultipleKeys
)(
HANDLE
,
ULONG
,
OBJECT_ATTRIBUTES
*
,
HANDLE
,
PIO_APC_ROUTINE
,
void
*
,
IO_STATUS_BLOCK
*
,
ULONG
,
BOOLEAN
,
void
*
,
ULONG
,
BOOLEAN
);
static
NTSTATUS
(
WINAPI
*
pNtWaitForSingleObject
)(
HANDLE
,
BOOLEAN
,
const
LARGE_INTEGER
*
);
static
HMODULE
hntdll
=
0
;
...
...
@@ -201,6 +203,7 @@ static BOOL InitFunctionPtrs(void)
/* optional functions */
pNtQueryLicenseValue
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtQueryLicenseValue"
);
pNtOpenKeyEx
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenKeyEx"
);
pNtNotifyChangeMultipleKeys
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtNotifyChangeMultipleKeys"
);
return
TRUE
;
}
...
...
@@ -1516,7 +1519,6 @@ static void test_notify(void)
NTSTATUS
status
;
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey Failed: 0x%08x
\n
"
,
status
);
...
...
@@ -1543,8 +1545,40 @@ static void test_notify(void)
status
=
pNtDeleteKey
(
subkey
);
ok
(
status
==
STATUS_SUCCESS
,
"NtDeleteSubkey failed: %x
\n
"
,
status
);
pNtClose
(
subkey
);
pNtClose
(
key
);
if
(
pNtNotifyChangeMultipleKeys
)
{
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey Failed: 0x%08x
\n
"
,
status
);
status
=
pNtNotifyChangeMultipleKeys
(
key
,
0
,
NULL
,
event
,
NULL
,
NULL
,
&
iosb
,
REG_NOTIFY_CHANGE_NAME
,
FALSE
,
NULL
,
0
,
TRUE
);
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
);
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
);
}
else
{
win_skip
(
"NtNotifyChangeMultipleKeys not available
\n
"
);
}
pNtClose
(
event
);
}
...
...
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