RegDeleteTree [3rd]
Alexandre Julliard
julliard at winehq.org
Thu Apr 19 05:14:01 CDT 2007
Stefan Leichter <Stefan.Leichter at camline.com> writes:
> + /* Recursively delete all the subkeys */
> + for (i = 0; i < dwKeyCount && !ret; i++) {
> + dwSize = dwMaxSubkeyLen;
> + ret = RegEnumKeyExW(hSubKey, i, lpszName, &dwSize, NULL,
> + NULL, NULL, NULL);
This won't work, the index will change as you delete keys.
> + } else {
> + if (!ret)
> + ret = RegSetValueW(hSubKey, NULL, REG_SZ, emptyW, 0);
The function is supposed to delete the key values, that's not what
this does.
You probably need to write some test cases...
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list