Class TWinRegistry (unit WinReg) |
Inherits from
TRegistry
# freeware} {# description
Title : Access class for Windows registry
Author : Dave White
Date : 24 April 1996
Portions of this code are Copyright (c) Borland International, 1996
This code is Freeware and may be used in any commercial or non-commercial applications
at no charge. Dave White shall not be liable in any way for any failure of this software,
or any adverse effects it has on you application - you have the source :-)
Author : Frank Zimmer
Date : 2 February 1997
CanCreate in the Create-Methode inserted
new: Exists, true when Key exists
constructor Create(const FileName: string;const CanCreate:boolean);
- default constructor sets root key to HKEY_CURRENT_USER
constructor CreateWithKey(key : HKEY; const FileName: string;const CanCreate:boolean);
- alternative constructor, allows user to specify the rootkey
procedure DeleteKey(const Section, Ident: String);
procedure EraseSection(const Section: string);
function Exists: Boolean;
function ReadBinaryData(const Section, Ident: string; var Buffer; BufSize: Integer): Integer;
function ReadBool(const Section, Ident: string; Default: Boolean): Boolean;
function ReadCurrency(const Section, Ident: string; Default: Currency): Currency;
function ReadDate(const Section, Ident: string; Default: TDateTime): TDateTime;
function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime;
function ReadFloat(const Section, Ident: string; Default: Double): Double;
function ReadInteger(const Section, Ident: string; Default: Longint): Longint;
procedure ReadSection(const Section: string; Strings: TStrings);
procedure ReadSections(Strings: TStrings);
procedure ReadSectionValues(const Section: string; Strings: TStrings);
function ReadString(const Section, Ident, Default: string): string;
function ReadTime(const Section, Ident: string; Default: TDateTime): TDateTime;
function SaveAppKey(key, filename : string): boolean;
procedure WriteBinaryData(const Section, Ident: string; var Buffer; BufSize: Integer);
procedure WriteBool(const Section, Ident: string; Value: Boolean);
procedure WriteCurrency(const Section, Ident: string; Value: Currency);
procedure WriteDate(const Section, Ident: string; Value: TDateTime);
procedure WriteDateTime(const Section, Ident: string; Value: TDateTime);
procedure WriteFloat(const Section, Ident: string; Value: Double);
procedure WriteInteger(const Section, Ident: string; Value: Longint);
procedure WriteString(const Section, Ident, Value: String);
procedure WriteTime(const Section, Ident: string; Value: TDateTime);
property FileName : string
FFileName : string;
constructor Create(const FileName: string;const CanCreate:boolean);
default constructor sets root key to HKEY_CURRENT_USER
constructor CreateWithKey(key : HKEY; const FileName: string;const CanCreate:boolean);
alternative constructor, allows user to specify the rootkey
procedure DeleteKey(const Section, Ident: String);
procedure EraseSection(const Section: string);
function Exists: Boolean;
function ReadBinaryData(const Section, Ident: string; var Buffer; BufSize: Integer): Integer;
function ReadBool(const Section, Ident: string; Default: Boolean): Boolean;
function ReadCurrency(const Section, Ident: string; Default: Currency): Currency;
function ReadDate(const Section, Ident: string; Default: TDateTime): TDateTime;
function ReadDateTime(const Section, Ident: string; Default: TDateTime): TDateTime;
function ReadFloat(const Section, Ident: string; Default: Double): Double;
function ReadInteger(const Section, Ident: string; Default: Longint): Longint;
procedure ReadSection(const Section: string; Strings: TStrings);
procedure ReadSections(Strings: TStrings);
procedure ReadSectionValues(const Section: string; Strings: TStrings);
function ReadString(const Section, Ident, Default: string): string;
function ReadTime(const Section, Ident: string; Default: TDateTime): TDateTime;
function SaveAppKey(key, filename : string): boolean;
procedure WriteBinaryData(const Section, Ident: string; var Buffer; BufSize: Integer);
procedure WriteBool(const Section, Ident: string; Value: Boolean);
procedure WriteCurrency(const Section, Ident: string; Value: Currency);
procedure WriteDate(const Section, Ident: string; Value: TDateTime);
procedure WriteDateTime(const Section, Ident: string; Value: TDateTime);
procedure WriteFloat(const Section, Ident: string; Value: Double);
procedure WriteInteger(const Section, Ident: string; Value: Longint);
procedure WriteString(const Section, Ident, Value: String);
procedure WriteTime(const Section, Ident: string; Value: TDateTime);
property FileName : string
FFileName : string;