diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index a095ee389b8..7620bdd26e4 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -505,7 +505,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, if (!(ret = wine_server_call( req ))) { copy_key_value_info( info_class, info, length, reply->type, - 0, wine_server_reply_size(reply) ); + name->Length, reply->total ); *result_len = fixed_size + reply->total; if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW; } diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 0a58d680b26..4a559a5c5b8 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -480,9 +480,7 @@ static void test_NtQueryValueKey(void) ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->Type); ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type); - todo_wine ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength); - todo_wine ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len); HeapFree(GetProcessHeap(), 0, partial_info); @@ -492,9 +490,7 @@ static void test_NtQueryValueKey(void) ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status); ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->Type); ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type); - todo_wine ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength); - todo_wine ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength); todo_wine ok(len == FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]) + full_info->DataLength + full_info->NameLength,