From bbde53fb0247111f3aff3078031efe76445cb024 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 19 Oct 2004 21:14:09 +0000 Subject: [PATCH] RegQueryValueW must return count in bytes for empty string too. --- dlls/advapi32/registry.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index 004ba50a78e..01d59f65c10 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -1252,11 +1252,11 @@ DWORD WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD * Retrieves the data associated with the default or unnamed value of a key. * * PARAMS - * hKey [I] Handle to an open key. - * lpSubKey [I] Name of the subkey of hKey. - * lpValue [O] Receives the string associated with the default value + * hkey [I] Handle to an open key. + * name [I] Name of the subkey of hKey. + * data [O] Receives the string associated with the default value * of the key. - * lpcbValue [I/O] Size of lpValue. + * count [I/O] Size of lpValue in bytes. * * RETURNS * Success: ERROR_SUCCESS @@ -1279,7 +1279,7 @@ DWORD WINAPI RegQueryValueW( HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count { /* return empty string if default value not found */ if (data) *data = 0; - if (count) *count = 1; + if (count) *count = sizeof(WCHAR); ret = ERROR_SUCCESS; } return ret; -- 2.11.4.GIT