RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry.OpenKeyReadOnly Method

Opens a specified key in a read-only manner.

Pascal
function OpenKeyReadOnly(const Key: String): Boolean;
C++
__fastcall Boolean OpenKeyReadOnly(const AnsiString Key);

Call OpenKeyReadOnly to make a specified key the current key. Key is the name of the key to open. If Key is nil (Delphi) or NULL (C++), the CurrentKey property is set to the key specified by the RootKey property. 

Key is opened with the security access value KEY_READ. 

OpenKey returns true if the key is successfully opened and CurrentKey is set to the key.

Note: After a successful call to OpenKeyReadOnly the Access property of the registry component is automatically changed to KEY_READ, regardless of what that property was set to prior to the method call.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!