Skip to content

Commit 446a260

Browse files
committed
+reg
1 parent 2f9b9e7 commit 446a260

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • modules/rostests/winetests/ntdll

modules/rostests/winetests/ntdll/reg.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,12 +839,15 @@ static void test_NtDeleteKey(void)
839839
{
840840
/* On older Windows versions the key cannot be deleted, when it still has values in it */
841841
ok(status == STATUS_CANNOT_DELETE, "NtDeleteKey unexpected status: 0x%08lx\n", status);
842-
PKEY_VALUE_BASIC_INFORMATION info = (PKEY_VALUE_BASIC_INFORMATION)buffer;
843-
while ((status = NtEnumerateKey(hkey, 0, KeyValueBasicInformation, info, sizeof(buffer), &size)) >= 0)
842+
PKEY_BASIC_INFORMATION info1 = (PKEY_BASIC_INFORMATION)buffer;
843+
ULONG index = 0;
844+
while ((status = NtEnumerateKey(hkey, index, KeyBasicInformation, info1, sizeof(buffer), &size)) >= 0)
844845
{
845-
string = (UNICODE_STRING){ info->NameLength, info->NameLength, info->Name };
846+
string = (UNICODE_STRING){ info1->NameLength, info1->NameLength, info1->Name };
846847
printf("got subkey %wZ\n", &string);
848+
index++;
847849
}
850+
PKEY_VALUE_BASIC_INFORMATION info = (PKEY_VALUE_BASIC_INFORMATION)buffer;
848851
while ((status = NtEnumerateValueKey(hkey, 0, KeyValueBasicInformation, info, sizeof(buffer), &size)) >= 0)
849852
{
850853
string = (UNICODE_STRING){ info->NameLength, info->NameLength, info->Name };

0 commit comments

Comments
 (0)