diff options
Diffstat (limited to 'avx512-0037785/packages/fcl-registry/src/registry.pp')
-rw-r--r-- | avx512-0037785/packages/fcl-registry/src/registry.pp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/avx512-0037785/packages/fcl-registry/src/registry.pp b/avx512-0037785/packages/fcl-registry/src/registry.pp index 7f11182b05..91177376e1 100644 --- a/avx512-0037785/packages/fcl-registry/src/registry.pp +++ b/avx512-0037785/packages/fcl-registry/src/registry.pp @@ -202,6 +202,8 @@ type fFileName : String; fPath : String; fPreferStringValues: Boolean; + fOldCurKey : HKEY; + fOldCurPath : UnicodeString; function OpenSection(const Section: string; CreateSection : Boolean = false): boolean; procedure CloseSection; public @@ -266,6 +268,7 @@ type procedure DeleteKey(const Section, Name: String); override; procedure UpdateFile; override; function ValueExists(const Section, Ident: string): Boolean; override; + function SectionExists(const Section: string): Boolean; override; property RegIniFile: TRegIniFile read FRegIniFile; end{$ifdef XMLREG}deprecated 'Use TRegistry instead. Will be removed in 4.0'{$endif} platform; @@ -1125,13 +1128,18 @@ end; function TRegistryIniFile.ValueExists(const Section, Ident: string): Boolean; begin - with FRegInifile do - if OpenSection(Section) then - try - Result:=FRegInifile.ValueExists(Ident); - finally - CloseSection; - end; + Result:=FRegInifile.OpenSection(Section); + if Result then + try + Result:=FRegInifile.ValueExists(Ident); + finally + FRegInifile.CloseSection; + end; +end; + +function TRegistryIniFile.SectionExists(const Section: string): Boolean; +begin + Result:=FRegIniFile.KeyExists(Section); end; {$ifdef XMLREG} |