注册表API

来源:互联网 发布:utorrent linux版 编辑:程序博客网 时间:2024/06/05 05:18

1.创建键:RegCreateKey函数

LONG RegCreateKey(   HKEY hKey,   LPCTSTR lpSubKey,   PHKEY phKResult);
2.打开键,RegOpenKey

LONG RegOpenKey(  HKEY hKey,  LPCTSTR lpSubKey,  PHKEY phkResult);

3.写入注册表 RegSetValue

LONG RegSetValue(    HKEY hKey,    LPCTSTR lpSubKey,    DWORD dwType,    LPCTSTR lpData,    DWORD cbData);

4.从注册表中读数据RegQueryValue

LONG RegQueryValue( HKEY hKey, LPCTSTR lpSubKey, LPTSTR lpValue, PLONG lpcbValue);




原创粉丝点击