System.Win.Registry.TRegistry.ReplaceKey

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ReplaceKey(const Key, FileName, BackUpFileName: string): Boolean;

C++

bool __fastcall ReplaceKey(const System::UnicodeString Key, const System::UnicodeString FileName, const System::UnicodeString BackUpFileName);

Properties

Type Visibility Source Unit Parent
function public
System.Win.Registry.pas
System.Win.Registry.hpp
System.Win.Registry TRegistry

Description

Replaces the hive file backing a key and all its subkeys with a hive stored in a different file, so that when the system is next started, the key and subkeys will have the values stored in the new file.

Call ReplaceKey to replace the hive file backing a key and all its subkeys with a different hive file. A hive is a discrete collection of keys, subkeys, and values that is rooted at the top of the registry hierarchy.

FileName indicates the name of the file containing the new key and subkey information. BackUpFileName is the name of a backup file used to store the current key and subkey information before it is overwritten.

ReplaceKey returns true if it is successful.

Note: The file specified by FileName parameter must be created with the SaveKey function, or by directly calling the Windows 95/NT RegSaveKey API function. Under the FAT file system FileName cannot have an extension.

See Also