Unit INIFile

****************************************************** ****************************************************** Project: Delphi Initialization Database Author: JBD E-mail: binel@alf.tel.hr Comment: "INI" stream utility classes and functions ******************************************************

Classes

TClassOfINIStream -
TINIStream -
TINIStreamFile -
TINIStreamRegistry -
TRegINIFileExtended -

Functions

FileErase -
FileRename -
FileSizeByName -
GetPrivatePath -
GetTmpFileName -
WriteDateTimeLog -
WriteLnTextStream -
WriteLog -
WriteTextStream -

Types

TBaseStream
TDestination
TEntryType
THKEY
TPrivateMode
TSubSectionProcedure
TVirtualApplication

Constants

CDefaultFileStream
CDefaultRegistryStream
CEntryLast
CEntryPrefix
CEntrySelected
CHKEYDescriptions
CHKEYS

Variables

VirtualApplication


Functions


function FileErase(const Name:string):Boolean;


function FileRename(const fromName,toName:string):Boolean;


function FileSizeByName(const Name:string):LongInt;


function GetPrivatePath(PM:TPrivateMode;const EXE,GROUP,USER:string;const Name:string):string;


function GetTmpFileName(const sDir,sExt:string):string;


procedure WriteDateTimeLog(const Msg:string);


procedure WriteLnTextStream(Stream:TStream;const Text:string);


procedure WriteLog(const Msg:string);


procedure WriteTextStream(Stream:TStream;const Text:string);


Types


TBaseStream=(bsFile,bsRegistry,bsOther);

TDestination=string

TEntryType=(etInteger,etBoolean,etFloat,etString,etBinary,etUnknown);

THKEY=(hkCLASSES_ROOT,hkCURRENT_USER,hkLOCAL_MACHINE,hkUSERS,hkCURRENT_CONFIG,hkEMPTY);

TPrivateMode=(pmPublic,pmGroupPrivate,pmUserPrivate);

TSubSectionProcedure=procedure(const Section:string;Data:Pointer) of object

TVirtualApplication = record
ComputerNo : Integer;
INIFileName : string;
UserPrivilegLevel : Integer;
ExeDir : string;
GroupDir : string;
UserDir : string;
TempDir : string;
ExeName : string;
GroupName : string;
UserName : string;
end;

Constants

CDefaultFileStream = 'File'

CDefaultRegistryStream = 'Registry'

CEntryLast = 'Last'

CEntryPrefix = 'Ent'

CEntrySelected = 'Selected'

CHKEYDescriptions = ( 'HKEY_CLASSES_ROOT', 'HKEY_CURRENT_USER', 'HKEY_LOCAL_MACHINE', 'HKEY_USERS', 'HKEY_CURRENT_CONFIG', 'HKEY_CURRENT_USER' )

CHKEYS = ( HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CURRENT_CONFIG, HKEY_CURRENT_USER )


Variables

VirtualApplication : TVirtualApplication