diff --git a/reactos/apps/tests/regtest/regtest.c b/reactos/apps/tests/regtest/regtest.c index 88e11b2c654..9eb8582f68b 100644 --- a/reactos/apps/tests/regtest/regtest.c +++ b/reactos/apps/tests/regtest/regtest.c @@ -51,7 +51,7 @@ void do_enumeratekey(PWSTR Name) void test1(void) { - HKEY hKey = NULL,hKey1; + HKEY hKey = NULL, hKey1; OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry"); @@ -826,6 +826,119 @@ void test8(void) dprintf("\t\t\t\tStatus =%x\n",Status); } +void test9(void) +{ + HKEY hKey = NULL, hKey1; + OBJECT_ATTRIBUTES ObjectAttributes; + NTSTATUS Status; + UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry"); + ULONG Index,Length,i; + KEY_BASIC_INFORMATION KeyInformation[5]; + KEY_VALUE_FULL_INFORMATION KeyValueInformation[5]; + + dprintf("NtOpenKey \\Registry : "); + InitializeObjectAttributes(&ObjectAttributes, + &KeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + Status=NtOpenKey( &hKey1, MAXIMUM_ALLOWED, &ObjectAttributes); + dprintf("\t\t\t\tStatus =%x\n",Status); + if (Status == 0) { + dprintf("NtQueryKey : "); + Status = NtQueryKey(hKey1, KeyBasicInformation, &KeyInformation[0], sizeof(KeyInformation), &Length); + dprintf("\t\t\t\t\tStatus =%x\n",Status); + if (Status == STATUS_SUCCESS) { + dprintf("\tKey Name = "); + for (i=0;i