Using C++ to edit the registry

后端 未结 5 1305
盖世英雄少女心
盖世英雄少女心 2020-11-30 12:18

I have a limited c++ background and I would like to edit the registry. For example, I want to grab the value of HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Curren

5条回答
  •  余生分开走
    2020-11-30 13:01

    Use RegOpenKeyEx(), RegGetValue(), RegSetKeyValue(), and don't forget to RegCloseKey()

    Here's a link to the reference: http://msdn.microsoft.com/en-us/library/ms724875(VS.85).aspx

    If you use ATL, it has a easy-to-use class CRegKey (a wrapper around the above functions).

提交回复
热议问题