diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index a70f95a6807..d39c1a34bb7 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -376,8 +376,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo, dst.MaximumLength = res; dst.Buffer = RtlAllocateHeap(GetProcessHeap(), 0, res * sizeof(WCHAR)); RtlExpandEnvironmentStrings_U(pEnvironment, &src, &dst, &res); - status = pQuery->QueryRoutine(pQuery->Name, pInfo->Type, dst.Buffer, - dst.Length, pContext, pQuery->EntryContext); + status = pQuery->QueryRoutine(pQuery->Name, REG_SZ, dst.Buffer, res, pContext, pQuery->EntryContext); RtlFreeHeap(GetProcessHeap(), 0, dst.Buffer); } else /* REG_MULTI_SZ */ diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 2bd77290ab9..e1ca45b9320 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -2863,7 +2863,7 @@ static struct query_reg_values_test query_reg_values_tests[] = /* DELETE deletes the value after reading it */ { {{ query_routine, RTL_QUERY_REGISTRY_DELETE, (WCHAR*)L"WindowsDrive" }}, - STATUS_SUCCESS, 1, WINE_TODO_TYPE | WINE_TODO_SIZE, REG_SZ, L"C:" + STATUS_SUCCESS, 1, 0, REG_SZ, L"C:" }, { {{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_SZ, (WCHAR*)L"Some default" }},