server: Return KeyFullInformation maximal string lengths in bytes.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2015-11-11 14:16:59 +01:00 committed by Alexandre Julliard
parent 35f9ee3d97
commit 3d5db6bdf5
2 changed files with 10 additions and 15 deletions

View File

@ -895,10 +895,10 @@ LSTATUS WINAPI RegQueryInfoKeyW( HKEY hkey, LPWSTR class, LPDWORD class_len, LPD
if (class_len) *class_len = info->ClassLength / sizeof(WCHAR);
if (subkeys) *subkeys = info->SubKeys;
if (max_subkey) *max_subkey = info->MaxNameLen;
if (max_class) *max_class = info->MaxClassLen;
if (max_subkey) *max_subkey = info->MaxNameLen / sizeof(WCHAR);
if (max_class) *max_class = info->MaxClassLen / sizeof(WCHAR);
if (values) *values = info->Values;
if (max_value) *max_value = info->MaxValueNameLen;
if (max_value) *max_value = info->MaxValueNameLen / sizeof(WCHAR);
if (max_data) *max_data = info->MaxValueDataLen;
if (modif) *modif = *(FILETIME *)&info->LastWriteTime;
@ -1090,10 +1090,10 @@ LSTATUS WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDW
else status = STATUS_SUCCESS;
if (subkeys) *subkeys = info->SubKeys;
if (max_subkey) *max_subkey = info->MaxNameLen;
if (max_class) *max_class = info->MaxClassLen;
if (max_subkey) *max_subkey = info->MaxNameLen / sizeof(WCHAR);
if (max_class) *max_class = info->MaxClassLen / sizeof(WCHAR);
if (values) *values = info->Values;
if (max_value) *max_value = info->MaxValueNameLen;
if (max_value) *max_value = info->MaxValueNameLen / sizeof(WCHAR);
if (max_data) *max_data = info->MaxValueDataLen;
if (modif) *modif = *(FILETIME *)&info->LastWriteTime;

View File

@ -908,18 +908,13 @@ static void enum_key( const struct key *key, int index, int info_class,
case KeyFullInformation:
for (i = 0; i <= key->last_subkey; i++)
{
struct key *subkey = key->subkeys[i];
len = subkey->namelen / sizeof(WCHAR);
if (len > max_subkey) max_subkey = len;
len = subkey->classlen / sizeof(WCHAR);
if (len > max_class) max_class = len;
if (key->subkeys[i]->namelen > max_subkey) max_subkey = key->subkeys[i]->namelen;
if (key->subkeys[i]->classlen > max_class) max_class = key->subkeys[i]->classlen;
}
for (i = 0; i <= key->last_value; i++)
{
len = key->values[i].namelen / sizeof(WCHAR);
if (len > max_value) max_value = len;
len = key->values[i].len;
if (len > max_data) max_data = len;
if (key->values[i].namelen > max_value) max_value = key->values[i].namelen;
if (key->values[i].len > max_data) max_data = key->values[i].len;
}
reply->max_subkey = max_subkey;
reply->max_class = max_class;