Commit bbde53fb authored by Alexandre Julliard's avatar Alexandre Julliard

RegQueryValueW must return count in bytes for empty string too.

parent 3dcbaaa4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment