关于Win32API操作注册表问题
时间:2011-12-26
来源:互联网
最近看别人操作注册表的源代码 感觉有点疑惑 有的代码是直接操作RegCreateKey()函数来修改注册表 而有的代码是先调用RegOpenKey()获取注册表对象 然后调用RegCreateKey()来操作 请问这两种方式使用起来有区别吗??
作者: fuly_ABC 发布时间: 2011-12-26
二个函数的区别可以参见MSDN:
RegOpenKey:
Opens the specified registry key,RegOpenKey does not create the specified key if the key does not exist in the database。
RegCreateKey:
Creates the specified registry key,If the key already exists in the registry, the function opens it。
简单的说RegOpenKey用于打开已有键值,RegCreateKey用于打开已有键值或者创建并打开新键值。
RegOpenKey:
Opens the specified registry key,RegOpenKey does not create the specified key if the key does not exist in the database。
RegCreateKey:
Creates the specified registry key,If the key already exists in the registry, the function opens it。
简单的说RegOpenKey用于打开已有键值,RegCreateKey用于打开已有键值或者创建并打开新键值。
作者: fight_in_dl 发布时间: 2011-12-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28