I'm trying a recursive deleting using RecursiveDeleteKey() from CRegKey ATL class. I succeed to get the HKEY valid handler and then using the same path for recursive delete.
I don't understand wky hKey is ok from RegOpenKeyEx() runs ok and RecurseDeleteKey() is not ok.Code:if(RegOpenKeyEx(key, szSubKey, 0, dwAccess, &hKey) == ERROR_SUCCESS) { CRegKey key; key.Attach(hKey); LONG lRes = key.RecurseDeleteKey(szSubKey); if (ERROR_SUCCESS != lRes) { // FAILL!!! } }
OS is WinXP SP3 x64 and szSubKey it's a HKEY_CURRENT_USER registry path.




Reply With Quote