Hmmm... What is your prog going to do exactly? Saying you want to retrieve any sort of value doesn't doesn't help. For instance, a username and password could be encrypted in a UDT and stored as a REG_BINARY value, making it undecipherable to the average Joe. If YOU were to read the value, you wouldn't be able to make sense of it, as you wouldn't know the structure of the UDT or the encryption method. (no insult intended ) The most you could do would be to check for its existence.

So it's back to square one... what type of key do you want to check ? If you only want to check existing keys, take a look at them with the registry editor to find out their type - REG_SZ etc. (I have 'stock' routines for most types)