RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TRegistry.OpenKey Method

Opens a specified key.

Pascal
function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
C++
__fastcall Boolean OpenKey(const AnsiString Key, Boolean CanCreate);

Call OpenKey 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. 

CanCreate specifies whether to create the specified key if it does not exist. If CanCreate is true, the key is created if necessary. 

Key is opened or created with the security access value specified by the Access property. OpenKey only creates non-volatile keys, A non-volatile key is stored in the registry and is preserved when the system is restarted.  

OpenKey returns true if the key is successfully opened or created 

 

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