Reported by Jeff Sinclair
See also entry #581.
In Delphi 5, Borland have introduced a new property to the
TRegistry Object - "Access".
From the help :
-----------------------------------
property Access: LongWord;
Description
Use Access to specify the level of security access to use when
opening keys. The OpenKey method uses the value of Access when
opening a registry key. Access is initialized by the TRegistry
constructor, but can be altered before calling OpenKey.
--------------------------------------
This is a good feature, but the problem here is that when you use
OpenKeyReadOnly it sets the Access property to KEY_READ and
leaves it set as KEY_READ. This mean that you can no longer
write to the registry without resetting the Access property.
Is this what was intended by Borland ? I can see no reason for
doing this. Note that the Access property is not used by
OpenKeyReadOnly, merely altered to KEY_READ.
This breaks a large portion of our code since we often read keys
"read only" and then modify them later.
Does Borland expect us the reset the access parameter every time
or were we wrong in reading the keys read only?
As far as I can see this is a Bug. |