unit xRegistry; interface uses Registry; type tRegistry=class(Registry.tRegistry) public function ReadIntegerDef(const Name:string; Def:Integer):integer; function ReadBoolDef(const Name:string; Def:boolean):boolean; end; implementation function tRegistry.ReadIntegerDef(const Name:string; Def:Integer):integer; var rdi:TRegDataInfo; begin Result:=Def; If GetDataInfo(Name, rdi) then if rdi.RegData=rdInteger then Result:=ReadInteger(Name); end; function tRegistry.ReadBoolDef(const Name:string; Def:boolean):boolean; var rdi:TRegDataInfo; begin Result:=Def; If GetDataInfo(Name, rdi) then if rdi.RegData=rdInteger then Result:=ReadBool(Name); end; end.