In MSDN it says that RegEnumValue should not be used when calling function that change the registry keys being enumerated.
So does this also apply to deleting registry key values?
Like this code does:
if (RegOpenKeyEx(m_hkey,m_path.c_str(),0,KEY_ALL_ACCESS,&key) == ERROR_SUCCESS)
{
bool error=false;
idx=0;
while (RegEnumValue(key,idx,name,&namesize,NULL,NULL,NULL,NULL) == ERROR_SUCCESS && !error)
{
error=(RegDeleteValue(key,name)!=ERROR_SUCCESS);
idx++;
}
RegCloseKey(key);
}