I have first called RegSetValueEx() function to write a value to a registry key. The HKEY was opened using KEY_SET_VALUE access right.
Now, I try to enumerate all values from this registry key using RegEnumValue() function. The HKEY for this was opened with KEY_QUERY_VALUE access right.
But I saw that all values except the one I added using RegSetValueEx(), are read.
I've attached the call to RegEnumValue();
Here, 'achValue' gets all values right, but when it reaches the value written using RegSetValueEx(), it just gets an empty string.
Can anyone explain why this happens?
for (i=0, retCode=ERROR_SUCCESS; i < cValues; i++)
cchValue = MAX_VALUE_NAME;
achValue = '\0';
retCode = RegEnumValue(hkey, i,