ntdll/tests: Test NtOpenKey with zero access.

Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Thomas Faber 2016-02-29 17:09:48 +01:00 committed by Alexandre Julliard
parent bf6db74f85
commit 5441f8352c

View file

@ -362,6 +362,13 @@ static void test_NtOpenKey(void)
status = pNtOpenKey(&key, am, &attr);
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status);
/* Zero accessmask */
attr.Length = sizeof(attr);
status = pNtOpenKey(&key, 0, &attr);
todo_wine
ok(status == STATUS_ACCESS_DENIED, "Expected STATUS_ACCESS_DENIED, got: 0x%08x\n", status);
if (status == STATUS_SUCCESS) NtClose(key);
/* Calling without parent key requres full registry path. */
pRtlCreateUnicodeStringFromAsciiz( &str, "Machine" );
InitializeObjectAttributes(&attr, &str, 0, 0, 0);