ntdll/tests: Fix some more failures on restricted Windows.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Alexandre Julliard 2016-01-27 12:15:48 +09:00
parent b0140f8ee2
commit 3e33f6c2d9
1 changed files with 21 additions and 17 deletions

View File

@ -1099,8 +1099,11 @@ static void test_query_object(void)
pRtlCreateUnicodeStringFromAsciiz( &path, "\\REGISTRY\\Machine\\Software\\Classes" );
status = pNtCreateKey( &handle, KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 );
ok( handle != 0, "NtCreateKey failed status %x\n", status );
ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
"NtCreateKey failed status %x\n", status );
pRtlFreeUnicodeString( &path );
if (status == STATUS_SUCCESS)
{
len = 0;
status = pNtQueryObject( handle, ObjectNameInformation, buffer, sizeof(buffer), &len );
ok( status == STATUS_SUCCESS , "NtQueryObject returned %x\n", status );
@ -1117,6 +1120,7 @@ static void test_query_object(void)
"name too short %s\n", wine_dbgstr_w(str->Buffer) );
trace( "got %s len %u\n", wine_dbgstr_w(str->Buffer), len );
pNtClose( handle );
}
}
static void test_type_mismatch(void)