FireDAC.Stan.Util.TFDConfigFile

From RAD Studio API Documentation
Jump to: navigation, search

System.Win.Registry.TRegistryIniFileSystem.IniFiles.TCustomIniFileSystem.TObjectTFDConfigFile

Delphi

TFDConfigFile = class({$IFDEF MSWINDOWS} TRegistryIniFile
{$ELSE}            TMemIniFile      {$ENDIF})

C++

class PASCALIMPLEMENTATION TFDConfigFile : public System::Win::Registry::TRegistryIniFile

Properties

Type Visibility Source Unit Parent
class public
FireDAC.Stan.Util.pas
FireDAC.Stan.Util.hpp
FireDAC.Stan.Util FireDAC.Stan.Util

Description

TRegistryIniFile is a wrapper for the Windows system registry.

FireDAC.Stan.Util.TFDConfigFile inherits from System.Win.Registry.TRegistryIniFile. All content below this line refers to System.Win.Registry.TRegistryIniFile.

TRegistryIniFile is a wrapper for the Windows system registry.

TRegistryIniFile presents a simple interface to the system registry and hides the need to know about the underlying structure of the registry. TRegistryIniFile enables handling the Windows system registry as if it were a Windows 3.x INI file. Instead of processing an INI file, however, TRegistryIniFile reads from and writes to the system registry. Because TRegistryIniFile, like TIniFile, descends from TCustomIniFile, you can use it in common code that writes to both INI files and the registry.

In addition, application developers that are switching from the use of INI files to the system registry can use this object to migrate their application with a minimum of coding changes. By finding all references to TIniFile in an application, replacing them with TRegistryIniFile, and recompiling the application, a developer can update an application to use the system registry instead of INI files without having to code any new logic into the application.

Note: Information contained in existing users' INI files is not migrated into the system registry using the method described above. A one-time operation to explicitly copy the INI file data, through TRegistryIniFile, must be used to do this.

TRegistryIniFile adapts the methods inherited from TCustomIniFile to operate on Registry entries rather than INI file keys. It reinterprets the FileName property as 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.

See Also

Code Examples