programs: Fixed two RegEnumValue name lengths.
This commit is contained in:
parent
0025eaefab
commit
19464a6bf7
|
@ -51,7 +51,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
|
||||||
|
|
||||||
while(TRUE)
|
while(TRUE)
|
||||||
{
|
{
|
||||||
lenName = sizeof(WCHAR[MAX_LOAD_STRING]);
|
lenName = sizeof(WCHAR[MAX_LOAD_STRING])/sizeof(WCHAR);
|
||||||
lenData = sizeof(WCHAR[MAX_LOAD_STRING]);
|
lenData = sizeof(WCHAR[MAX_LOAD_STRING]);
|
||||||
|
|
||||||
retEnum = RegEnumValue(hKey, i, wszName, &lenName,
|
retEnum = RegEnumValue(hKey, i, wszName, &lenName,
|
||||||
|
|
|
@ -491,7 +491,7 @@ WCHAR **enumerate_valuesW(HKEY root, WCHAR *path)
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
WCHAR name[1024];
|
WCHAR name[1024];
|
||||||
DWORD namesize = sizeof(name);
|
DWORD namesize = sizeof(name)/sizeof(name[0]);
|
||||||
BOOL removed = FALSE;
|
BOOL removed = FALSE;
|
||||||
|
|
||||||
/* find out the needed size, allocate a buffer, read the value */
|
/* find out the needed size, allocate a buffer, read the value */
|
||||||
|
|
Loading…
Reference in New Issue