Enumerating Subkeys using ATL class cRegKey
How do I do it? I have looked at msdn and all the methods and can't figure
out how to enumerate the subkeys of a key.
Thanks
jc
[149 byte] By [
Strider] at [2007-11-10 12:52:23]

# 1 Re: Enumerating Subkeys using ATL class cRegKey
"Strider" <jf_cantley@empowered.com> wrote:
>How do I do it? I have looked at msdn and all the methods and can't figure
>out how to enumerate the subkeys of a key.
>
>Thanks
>jc
Use RegEnumKey. it's simple.
CRegKey key, key1;
key.Open(...);
char szSubKeyName[1024];
DWORD dwIndex = 0;
while ( RegEnumKey(key, dwIndex, szSubKeyName, 1024) == ERROR_SUCCESS )
{
key1.Open(key, ...); // for example
...
dwIndex++;
}
Shoom at 2007-11-11 20:52:55 >
