RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegIniFile Class

TRegIniFile is a low-level wrapper for the Windows 95/NT system registry.

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

Registry

TRegIniFile presents a simple interface to the system registry, hiding the need to know about the underlying structure of the registry. TRegIniFile acts as a helper object to TRegistryIniFile, which descends from TCustomIniFile (and is therefore more widely compatible with other INI file classes). 

TRegIniFile enables handling the Windows 95/NT system registry as if it were a Windows 3.x INI file. Instead of processing an INI file, however, TRegIniFile reads from and writes to the system registry. 

Although TRegIniFile descends from TRegistry, it adds the properties and methods used by a TIniFile object. The FileName passed to a TRegIniFile object becomes a subkey under the system registry's root key (HKEY_CURRENT_USER by default). What corresponds to a section in an INI file is treated as a key in the system registry, and what corresponds to data entries under a section in an INI file are treated as data values under a key in the system registry.

Note: TRegIniFile is intended to be used primarily as a helper object to TRegistryIniFile, which unifies the interface to INI files and the system registry. However, applications can use TRegIniFile directly.
 

 

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