Does anyone have a smal example of how to programmatically, in c/c++, load a users registry hive? I would loike to load a hive set some values and close the hive.
Thanks in advance for any help.
Tony
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t got a specific example, but the Windows API calls you need would be:
RegOpenKeyEx()to load the registrykey
RegSetValueEx()/RegGetValue()[and sisterfunctions] to get/set registry values
RegCloseKey()to close theregistry.
There’s some example code behind this link on codersource.net … although I can’t vouch for how complete or correct it is. Review against the MSDN 🙂