Registry Key Options

5/10/2007

The following values are registry keys.

Value Name Description

0

DAREG_OPTION_NON_VOLATILE

This key is not volatile. This is the default. The information is stored in a file and is preserved when the system is restarted. The RegSaveKey function saves keys that are not volatile.

1

DAREG_OPTION_VOLATILE

All keys created by the function are volatile. 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 system is shut down. For registry keys loaded by the RegLoadKey function, this occurs when the corresponding RegUnloadKey is performed. The RegSaveKey function does not save volatile keys. This flag is ignored for keys that already exist.

4

DAREG_OPTION_BACKUP_RESTORE

If this flag is set, the function ignores the samDesired parameter of REGCREATEKEY and attempts to open the key with the access required to backup or restore the key. If the calling thread has the SE_BACKUP_NAME privilege enabled, the key is opened with ACCESS_SYSTEM_SECURITY and KEY_READ access. If the calling thread has the SE_RESTORE_NAME privilege enabled, the key is opened with ACCESS_SYSTEM_SECURITY and KEY_WRITE access. If both privileges are enabled, the key has the combined accesses for both privileges.

See Also

Concepts

Constants