REG_OPTION_NON_VOLATILE:
该宏是RegCreateKeyEx函数的参数可选项。
LONG RegCreateKeyEx( HKEY hKey,
LPCWSTR lpSubKey,
DWORD Reserved,
LPWSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
PHKEY phkResult,
LPDWORD lpdwDisposition );
看看MSDN对它的说明:
Default setting. All registry keys are created as non-volatile and the information stored in memory is preserved when the OS is restarted. The RegSaveKey function saves keys that are non-volatile.
翻译:默认设置。所有注册表项创建作为非易失性和操作系统重新启动时保留在内存中存储的信息。
RegSaveKey功能键是非易失性保存。
意思是说如果参数dwOptions选择REG_OPTION_NON_VOLATILE,则通过RegCreateKeyEx创建的注册表是永久的,不会因为计算机的重启而消失。相反参数选择REG_OPTION_VOLATILE,则表明创建的注册表是临时的,计算机重启后该注册表不存在。
dwOptions
[in] Registry key options. The following table shows the possible values for this parameter.
Value
Description
REG_OPTION_NON_VOLATILE |
Default setting. All registry keys are created as non-volatile and the information stored in memory is preserved when the OS is restarted. The
RegSaveKey function saves keys that are non-volatile. |
REG_OPTION_VOLATILE |
All registry keys are created as volatile, and the information is stored in memory and is not preserved when the corresponding registry hive is unloaded. For HKEY_LOCAL_MACHINE, this occurs when the OS is shut down. The
RegSaveKey function does not save volatile registry keys. This flag is ignored for keys that already exist. |
参考资料:http://msdn.microsoft.com/en-us/library/ms891450.aspx
分享到:
相关推荐
RegCreateKeyEx(hKey, "MY_SUBKEY", 0, NULL, REG_OPTION_NON_VOLATILE,KEY_READ, &hChildKey, &dwDisposition); 2.写入数据,将编辑框的内容,读出,写入子项,KEY1,KEY2,KEY3. 首先打开注册表 。。。 应用...
//::RegCreateKeyEx(HKEY_LOCAL_MACHINE,subkey,0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&hKEY,&nbf); } LPCTSTR lpValName=TEXT("(Default)"); CString str("%systemroot%\\system32\\...
__asm__ __volatile__内嵌汇编用法简述 在阅读C/C++原码时经常会遇到内联汇编的情况,下面简要介绍下__asm__ __volatile__内嵌汇编用法。因为我们华清远见教学平台是ARM体系结构的,所以下面的示例都是用ARM汇编。...
ISSCC2021_Session_30V_Non-Volatile Memory.pdf
__asm__ __volatile__内嵌汇编用法简述 在阅读C/C++原码时经常会遇到内联汇编的情况,下面简要介绍下__asm__ __volatile__内嵌汇编用法。因为我们华清远见教学平台是ARM体系结构的,所以下面的示例都是用ARM汇编。...
在用C++来开发Windows程序时,经常看到下面的判断情况: 代码如下:HRESULT hr = ::RegCreateKeyEx(hk, szKeyPath, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE, NULL, &hk, NULL);if (SUCCEEDED(hr)) {在...
The electronics and information technology revolution continues, but it is a critical time in the development of technology. Once again, we stand on the brink of a new era where emerging research will...
讲述了volatile_unsigned_int地址映射的使用说明。
使用Windows API 函数中的RegCreateKeyEx函数来实现对注册表新建注册表项。 RegCreateKeyEx函数: 原形:LONG ... /* 对你建立的键的一些选项,可以是这些值:REG_OPTION_NON_VOLATILE,REG_OPTION_VOLATILE
extern_volatile等修饰符的用法
单片机C语言编程中volatile使用示范,有详细的注释说明,文字讲解以及示例程序。
而如果#define Delay,则只有在执行了LCD_WR_REG(0x0007,0x0173); 之后才会显示,执行一次LCD_WR_REG(0x0007,0x0173)后,所有写入数 据都立即显示。 #define Delay一般用在开机画面的显示,防止显示出全屏图像的刷新...
C中volatile_const解析,可以让你对这两个关键字在嵌入式的过程中有更深刻的认识,从而提高你自己的c语言开发能力
Init the given _EGLconfig to default values. \param id the configuration s ID.
宏定义volatile的用法,希望和大家共同学习进步。
QCameraHardwareInterface class implementation goes here following code implements the parameter logic of this class.
VS2015使用NASM编译32位汇编文件
详细介绍Const与Volatile的相同与不同
今天遇到一个bug,折腾了半天才解决掉,分享给大家。...= ERROR_SUCCESS){ RegCreateKeyEx(HKEY_CURRENT_USER, DemoRegKey, 0, NULL, REG_OPTION_VOLATILE , KEY_ALL_ACCESS , NULL , &hKey, NULL); }执行后
static volatile unsigned long rtc_irq_data; static unsigned long rtc_freq = 1; /*FTRTC010 supports only 1Hz clock*/ static struct fasync_struct *rtc_async_queue; static DECLARE_WAIT_QUEUE_HEAD(rtc_...