【原创】注册表的读写API(windows)
来源:互联网 发布:英文面试常见问题知乎 编辑:程序博客网 时间:2024/05/21 09:41
/// 根键值
HKEY m_base;
m_base = HKEY_CURRENT_USER;
/// 注册表位置
wxString m_path;
m_path = wxT("Software\\ThpClient\\DirPath\\CalcDllPath");
/// 注册表键值位置
std::string m_key;
m_key = "myselfValue";
/// 需要修改的键值
std::string m_value = "http://www.baidu.com";
/// 键值句柄,存储
HKEY m_hKey;
/// 错误代号
LONG LastError;
/// 打开注册表的类型
DWORD disp= REG_OPENED_EXISTING_KEY;
/// 创建注册表句柄
RegCreateKeyEx(m_base, m_path, 0, _T(""), REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &m_hKey, &disp))!=ERROR_SUCCESS)
/// 写入键值
RegSetValueExA(m_hKey, m_key.c_str(), 0, REG_SZ, (const BYTE*)m_value.c_str(),m_value.size())==ERROR_SUCCESS)
char m_readvalue[512] = {0};
DWORD m_typeword;
DWORD m_valuelength;
RegQueryValueExA(m_hKey, m_key.c_str(), 0, &m_typeword, (LPBYTE)m_readvalue,&m_valuelength);
LastError = RegCloseKey(m_hKey);
- 【原创】注册表的读写API(windows)
- Windows读写注册表的例子
- windows下读写注册表的类
- java读写windows注册表
- java读写windows注册表
- Windows关于操作注册表的API介绍
- 不用API,也能玩注册表--vb !(downmoon原创)
- 不用API,也能玩注册表--vb !(downmoon原创)
- windows注册表API使用
- windows注册表 api
- Windows API:注册表
- [原创]用MS SQL玩转你的Windows 注册表
- 离线方式读写WINDOWS注册表
- Qt编程4:QSettings使用一(windows注册表的读写:实际操作)
- C++ 注册表的读写
- 读写注册表的封装
- 读写注册表的函数
- 注册表的读写问题
- 【Linux基础】网络相关命令
- Java 反射机制
- mac sql developer 解压后不能打开
- 二叉搜索树
- 第一章 Shell编程基础
- 【原创】注册表的读写API(windows)
- Js获取table中当前选择行号
- Android学习网站
- 网络安全 Network password
- Android 实现全屏 无标题栏
- 【Linux基础】Linux下C语言编程环境概述
- 快速幂
- Android编译
- Lucene 搜索引擎学习