View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022611FPCPackagespublic2012-08-09 14:262014-02-13 17:32
ReporterManfred Hahn 
Assigned ToMichael Van Canneyt 
PlatformWindowsOSWindows 7OS Version64-bit
Product Version2.6.0Product Build 
Target Version2.8.0Fixed in Version2.7.1 
Summary0022611: TRegistryIniFile does not work as expected
DescriptionTRegistryIniFile does not read/write the expected keys and values in the windows registry.
Steps To Reproduceon a windows system execute something like this:
  var RegistryIniFile : TRegistryIniFile;

Look into the registry (regedit) for the key. It has to be
with a value 'TestString'.
You will not find it. Neither you will be able to read a string at a known position in the registry.
Additional InformationThis is because the FileName given in the TRegistryIniFile.Create constructor is not taken into account in the functions ReadString etc. The actually used registry key always has to be build by concatenation of the FileName and the Section param of the individual functions/procedures.

To overcome this error I have changed the TRegistryIniFile implementation.
I defer all functionality to the TRegIniFile class. TRegIniFile has been extended for reading/writing Float/Time/Date/Datetime-Values.
I have decided not to deal with the CurrentKey, which was preserved in the old code. TRegistryIniFile had been made to be a substitute for TIniFile, where a CurrentKey is not known. If there is a need for preserving CurrentKey it should be done completely in TRegIniFile. But I don't believe this to be necessary.

In the appendix is a diff file with my changes. (diff from trunc)
TagsNo tags attached.
Fixed in Revision26764
Attached Filesdiff file icon patch.diff [^] (16,158 bytes) 2012-08-09 14:26 [Show Content]

- Relationships
related to 0025483resolvedMichael Van Canneyt Win64 write to registry fails if section does not exist 

-  Notes
Michael Van Canneyt (administrator)
2014-02-13 17:32

Fixed, using slightly different approach. Thanks for reporting.

- Issue History
Date Modified Username Field Change
2012-08-09 14:26 Manfred Hahn New Issue
2012-08-09 14:26 Manfred Hahn File Added: patch.diff
2014-02-08 18:41 Michael Van Canneyt Assigned To => Michael Van Canneyt
2014-02-08 18:41 Michael Van Canneyt Status new => assigned
2014-02-13 15:38 Michael Van Canneyt Relationship added related to 0025483
2014-02-13 17:32 Michael Van Canneyt Fixed in Revision => 26764
2014-02-13 17:32 Michael Van Canneyt Note Added: 0073038
2014-02-13 17:32 Michael Van Canneyt Status assigned => resolved
2014-02-13 17:32 Michael Van Canneyt Fixed in Version => 2.7.1
2014-02-13 17:32 Michael Van Canneyt Resolution open => fixed
2014-02-13 17:32 Michael Van Canneyt Target Version => 2.8.0

MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker