01-02-2007 04:15 PM
01-02-2007 05:18 PM
Hi Brian, how are you treating the registry? Supposing you are using functions included in the programmer's toolbox, you can use RegQueryInfoOnKeyto obtain both the number of subkeys and the number of values present in a given registry key.
If you want to know value names, you can iterate from 0 to number of values with RegEnumerateValue; unfortunately there isn't a corresponding RegEnumerateKeys, but you can create your own function starting from the existing one replacing RegEnumValue with RegEnumKey SDK function.
SDK documentation includes a good sample code for enumerating both keys and values in a given registry key: search it with "Using the registry" (be sure to add quotes to reach the correct page) or find it in msdn site