ntdll: Fixed argument order in NtNotifyChangeKey.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2015-11-06 13:58:44 +01:00 committed by Alexandre Julliard
parent bb44de787d
commit a0d0d0dd0a
3 changed files with 29 additions and 4 deletions

View File

@ -2674,8 +2674,8 @@ LSTATUS WINAPI RegNotifyChangeKeyValue( HKEY hkey, BOOL fWatchSubTree,
hEvent, fAsync); hEvent, fAsync);
status = NtNotifyChangeKey( hkey, hEvent, NULL, NULL, &iosb, status = NtNotifyChangeKey( hkey, hEvent, NULL, NULL, &iosb,
fdwNotifyFilter, fAsync, NULL, 0, fdwNotifyFilter, fWatchSubTree, NULL, 0,
fWatchSubTree); fAsync);
if (status && status != STATUS_TIMEOUT) if (status && status != STATUS_TIMEOUT)
return RtlNtStatusToDosError( status ); return RtlNtStatusToDosError( status );

View File

@ -643,10 +643,10 @@ NTSTATUS WINAPI NtNotifyChangeKey(
IN PVOID ApcContext OPTIONAL, IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter, IN ULONG CompletionFilter,
IN BOOLEAN Asynchronous, IN BOOLEAN WatchSubtree,
OUT PVOID ChangeBuffer, OUT PVOID ChangeBuffer,
IN ULONG Length, IN ULONG Length,
IN BOOLEAN WatchSubtree) IN BOOLEAN Asynchronous)
{ {
NTSTATUS ret; NTSTATUS ret;

View File

@ -146,6 +146,7 @@ static NTSTATUS (WINAPI * pRtlFreeHeap)(PVOID, ULONG, PVOID);
static LPVOID (WINAPI * pRtlAllocateHeap)(PVOID,ULONG,ULONG); static LPVOID (WINAPI * pRtlAllocateHeap)(PVOID,ULONG,ULONG);
static NTSTATUS (WINAPI * pRtlZeroMemory)(PVOID, ULONG); static NTSTATUS (WINAPI * pRtlZeroMemory)(PVOID, ULONG);
static NTSTATUS (WINAPI * pRtlpNtQueryValueKey)(HANDLE,ULONG*,PBYTE,DWORD*,void *); 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 HMODULE hntdll = 0; static HMODULE hntdll = 0;
static int CurrentTest = 0; static int CurrentTest = 0;
@ -183,6 +184,7 @@ static BOOL InitFunctionPtrs(void)
NTDLL_GET_PROC(NtQueryInformationProcess) NTDLL_GET_PROC(NtQueryInformationProcess)
NTDLL_GET_PROC(NtSetValueKey) NTDLL_GET_PROC(NtSetValueKey)
NTDLL_GET_PROC(NtOpenKey) NTDLL_GET_PROC(NtOpenKey)
NTDLL_GET_PROC(NtNotifyChangeKey)
NTDLL_GET_PROC(RtlFormatCurrentUserKeyPath) NTDLL_GET_PROC(RtlFormatCurrentUserKeyPath)
NTDLL_GET_PROC(RtlCompareUnicodeString) NTDLL_GET_PROC(RtlCompareUnicodeString)
NTDLL_GET_PROC(RtlReAllocateHeap) NTDLL_GET_PROC(RtlReAllocateHeap)
@ -1502,6 +1504,28 @@ static void test_NtQueryKey(void)
pNtClose(key); pNtClose(key);
} }
static void test_notify(void)
{
OBJECT_ATTRIBUTES attr;
IO_STATUS_BLOCK iosb;
NTSTATUS status;
HANDLE key, event;
InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0);
status = pNtOpenKey(&key, KEY_ALL_ACCESS, &attr);
ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status);
event = CreateEventW(NULL, FALSE, FALSE, NULL);
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);
pNtClose(key);
pNtClose(event);
}
START_TEST(reg) START_TEST(reg)
{ {
static const WCHAR winetest[] = {'\\','W','i','n','e','T','e','s','t',0}; static const WCHAR winetest[] = {'\\','W','i','n','e','T','e','s','t',0};
@ -1526,6 +1550,7 @@ START_TEST(reg)
test_NtQueryLicenseKey(); test_NtQueryLicenseKey();
test_NtQueryValueKey(); test_NtQueryValueKey();
test_long_value_name(); test_long_value_name();
test_notify();
test_NtDeleteKey(); test_NtDeleteKey();
test_symlinks(); test_symlinks();
test_redirection(); test_redirection();