RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry.MoveKey Method

Moves an existing key, its subkeys, and data values to a new location using a new key name.

Pascal
procedure MoveKey(const OldName: string; const NewName: string; Delete: Boolean);
C++
__fastcall MoveKey(const AnsiString OldName, const AnsiString NewName, Boolean Delete);

Call MoveKey to copy or move an existing key, its subkeys, and data values to a different location. Under Windows 95, copying is recursive. If a key contains subkeys and data values, they too, are copied. When the operation is complete, the new key is closed. Under Windows NT, subkeys must be moved explicitly with separate calls to MoveKey. 

OldName specifies the key to copy or move. NewName specifies a name for the duplicate key to create. If the key specified by NewName does not exist, MoveKey creates it. Delete specifies whether to delete the old key after the copy operation. If Delete is true, the key specified by OldName is deleted after it is copied. Otherwise the old key is closed. 

 

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