LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find/read registry key names in XP?

I'm using Labwindows/CVI 8.0, and trying to write an application that will read registry key names.  I realize that there are documented methods for how to read or change or delete a key value, but what if I just want to read the key name(s)?  Any ideas?
 
Any suggestions would be greatly appreciated.
 
- Brian
0 Kudos
Message 1 of 2
(3,208 Views)

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



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,197 Views)