API documentation says that RegEnumKeyEx, RegEnumValue and

RegQueryInfoKey takes the size of the buffers as characters.
This commit is contained in:
Uwe Bonnes 1998-11-08 14:22:31 +00:00 committed by Alexandre Julliard
parent 44d31a5776
commit 877634420f
1 changed files with 3 additions and 11 deletions

View File

@ -2707,14 +2707,14 @@ DWORD WINAPI RegEnumKeyEx32A( HKEY hkey, DWORD iSubkey, LPSTR lpszName,
);
if (lpszName) {
lpszNameW = (LPWSTR)xmalloc(*lpcchName*2);
lpcchNameW = *lpcchName*2;
lpcchNameW = *lpcchName;
} else {
lpszNameW = NULL;
lpcchNameW = 0;
}
if (lpszClass) {
lpszClassW = (LPWSTR)xmalloc(*lpcchClass*2);
lpcchClassW = *lpcchClass*2;
lpcchClassW = *lpcchClass;
} else {
lpszClassW =0;
lpcchClassW=0;
@ -2860,7 +2860,7 @@ DWORD WINAPI RegEnumValue32A( HKEY hkey, DWORD iValue, LPSTR lpszValue,
lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2);
if (lpbData) {
lpbDataW = (LPBYTE)xmalloc(*lpcbData*2);
lpcbDataW = *lpcbData*2;
lpcbDataW = *lpcbData;
} else
lpbDataW = NULL;
@ -3311,14 +3311,6 @@ DWORD WINAPI RegQueryInfoKey32A( HKEY hkey, LPSTR lpszClass, LPDWORD lpcchClass,
);
if (ret==ERROR_SUCCESS && lpszClass)
lstrcpyWtoA(lpszClass,lpszClassW);
if (lpcchClass)
*lpcchClass/=2;
if (lpcchMaxSubkey)
*lpcchMaxSubkey/=2;
if (lpcchMaxClass)
*lpcchMaxClass/=2;
if (lpcchMaxValueName)
*lpcchMaxValueName/=2;
if (lpszClassW)
free(lpszClassW);
return ret;