RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry.SaveKey Method

Opens the specified key with the security access value KEY_ALL_ACCESS and saves the specified key and all of its subkeys and values to a hive file.

Pascal
function SaveKey(const Key: string; const FileName: string): Boolean;
C++
__fastcall Boolean SaveKey(const AnsiString Key, const AnsiString FileName);

Call SaveKey to open a key with a security access value of KEY_ALL_ACCESS, and save the key and its subkeys and data values to a hive file. A hive is a discrete collection of keys, subkeys, and values that is rooted at the top of the registry hierarchy. 

Key is the key to save. FileName is the file into which to save the key information. It must be the name of a new file that does not already exist. On FAT file systems FileName cannot include an extension. 

Files created by SaveKey are passed as parameters to the RestoreKey, ReplaceKey and LoadKey functions. 

If SaveKey is successful it returns true and closes the key. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!