On Do, 2007-06-07 at 00:00 +0200, Stefan Leichter wrote:
Replacing recursive_delete_key with RegDeleteTree is not the same. As Example:
res = recursive_delete_keyA(HKEY_CLASSES_ROOT,
list->progid);
res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); if (res != ERROR_SUCCESS) goto error_close_coclass_key;
When the Initial RegOpenKey failed, RegDeleteTree is returning ERROR_FILE_NOT_FOUND and the codepath went to the error-label, but the old recursive_delete_keyA returned ERROR_SUCCESS.
See this removed Line from recursive_delete_keyA/W: - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS;
This additional change should work: if ((res != ERROR_SUCCESS) && (res != ERROR_FILE_NOT_FOUND)) { goto error_close_coclass_key; }
Thanks