Is there an API that will delete all the values under a specific registry key?
for example, I have the following key
HKEY_CURRENT_USER\Software\MyCompany\Program\Myconfig
under it I have
(Default)
SomeVal
SomeOtherVal
YetSomeOtherVat
…
There might be 10, 20, 100 values there. It depends what you set on the application.
Is there a way in C to delete them all without having to iterate one by one and delete them?
Thanks, code is appreciated.
The SHDeleteKey function from Shlwapi.lib does what you want.
When you only need this on Vista and later OS versions, you can use RegDeleteTree