Stefan Leichter Stefan.Leichter@camline.com writes:
- /* Recursively delete all the subkeys */
- for (i = 0; i < dwKeyCount; i++) {
dwSize = dwMaxLen;
ret = RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL,
NULL, NULL, NULL);
There's no reason to use the key count, you should enum until you get an error, it's more reliable.
for (i = 0; i < dwValCount; i++) {
dwSize = dwMaxLen;
ret = RegEnumValueW(hKey, 0, lpszName, &dwSize, NULL, NULL, NULL, NULL);
Same here.