RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry Class

TRegistry is a low-level wrapper for the system registry and functions that operate on the registry.

Pascal
TRegistry = class(TObject);
C++
class TRegistry : public TObject;

Registry

Use TRegistry to encapsulate access to the Windows system registry in an application. The registry is a database that an application can use to store and retrieve configuration information. Configuration information is stored in a hierarchical tree. Each node in the tree is called a key. Every key can contain subkeys and data values that represent part of the configuration information for an application. 

All keys that an application creates, opens, reads, or writes are subkeys of predefined root keys. By default, a TRegistry object is created with a root key of HKEY_CURRENT_USER. 

Only one key is accessible at a time in a TRegistry object. To determine the key that is currently accessible, read the value of the CurrentKey property. TRegistry methods enable an application to open, close, save, move, copy, and delete keys. 

One or more data values containing actual configuration information can be stored in a key. TRegistry methods enable an application to query a key to see if it contains data, to read data in a key, and to write data to a key.

Note: The TRegistry component is not fully compatable with the Windows NT environment. Functions such as RestoreKey and SaveKey may not perform properly without a significant number of workarounds.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!