RegEnumKey returns ERROR_ACCESS_DENIED
Hi folks,
Can someone tell me what I need to do to enumerate the subkeys of a registry key? Is there a special privilege for this which overrides the dacl or do I need to put an entry in the dacl to allow it?
I'm currently running with SeRestorePrivilege and SeTakeOwnershipPrivilege.
xx.
Re: RegEnumKey returns ERROR_ACCESS_DENIED
You have to RegOpenKeyEx the key which subkeys are to be enumerated with KEY_ENUMERATE_SUB_KEYS access mask.
You should use RegEnumKeyEx rather than RegEnumKey
Re: RegEnumKey returns ERROR_ACCESS_DENIED
Thanks for pointing this out. I am now getting the same error back from RegOpenKeyEx.