帮助

内容读取中…

内容读取中…

首页  |  相册  |  共享  |  群组
搜索

正文

用RegCreateKeyEx()函数在注册表中创建一个自己的键值 (2005-03-23 12:41)

函数说明:
    LONG RegCreateKey(
     HKEY hKey, // handle to an open key
     LPCTSTR lpSubKey, // address of name of subkey to open
     PHKEY phkResult // address of buffer for opened handle
    );
    例子:
    //to create subkey "HKEY_LOCAL_MACHINESOFTWAREtest"
    ret = RegCreateKey(HKEY_LOCAL_MACHINE, "SOFTWAREtest",&hKey)
    根据ret判断成功与否。
    
    函数说明:
    LONG RegCreateKeyEx(
     HKEY hKey, // handle to an open key
     LPCTSTR lpSubKey, // address of subkey name
     DWORD Reserved, // reserved
     LPTSTR lpClass, // address of class string
     DWORD dwOptions, // special options flag
     REGSAM samDesired, // desired security access
     LPSECURITY_ATTRIBUTES lpSecurityAttributes,
     // address of key security structure
     PHKEY phkResult, // address of buffer for opened handle
     LPDWORD lpdwDisposition // address of disposition value buffer
    );
    用法都差不多。
    记住调用RegSetValueEx 或RegSetValue 设置键值,用RegCloseKeyEx 或RegCloseKey 关闭。

评论 (1) | 阅读 (1930)

评论
    内容读取中…
发表评论

你还没有登录,现在登录

个人档案

内容读取中…

博客公告

内容读取中…

博客日历

内容读取中…

文章分类

内容读取中…

文章存档

    内容读取中…

最新发表

    内容读取中…

最新评论

内容读取中…

给博主留言

内容读取中…

博主好友

内容读取中…

最新访客

内容读取中…

博客统计

    内容读取中…

友情链接

新闻订阅