RegKey is a class representing the Windows registry (it is only available
under Windows). One can create, query and delete registry keys using this
class.
The Windows registry is easy to understand. There are five registry keys,
namely:
After creating a key, it can hold a value. The values can be:
None
Software\\MyKey");
//will create the Key if it does not exist if( !pRegKey→Exists() ) pRegKey→Create(); //will create a new value MYVALUE and set it to 12 pRegKey→SetValue(“MYVALUE”,12); //Query for the Value and Retrieve it long lMyVal; String strTemp; pRegKey→QueryValue(“MYVALUE”,&lMyVal); strTemp.Printf(“MessageBox(strTemp,”Registry Value",0,this); //Retrive the number of SubKeys and enumerate them Integer nSubKeys; pRegKey→GetKeyInfo(&nSubKeys,NULL,NULL,NULL); pRegKey→GetFirstKey(strTemp,1); for(int i=0;i<nSubKeys;i++) { MessageBox(strTemp,“SubKey Name”,0,this); pRegKey→GetNextKey(strTemp,1); }The constructor to set the full name of the key.
RegKey.new(%(arg-type)RegKey% keyParent, String strKey)The constructor to set the full name of the key under a previously created parent.
Closes the key.
Creates the key. Will fail if the key already exists and bOkIfExists is false.
Deletes this key and all of its subkeys and values recursively.
Deletes the subkey with all of its subkeys/values recursively.
Deletes the named value.
Returns true if the key exists.
Gets the name of the registry key.
Gets the first key.
Gets the first value of this key.
Gets information about the key.
Gets the next key.
Gets the next key value for this key.
Returns true if the value exists.
Returns true if any values exist.
Returns true if given subkey exists.
Returns true if any subkeys exist.
Returns true if this key is empty, nothing under this key.
Returns true if the key is opened.
Explicitly opens the key. This method also allows the key to be opened in
read-only mode by passing RegKey::Read
instead of default
RegKey::Write
parameter.
Retrieves the string value.
Boolean query_value(%(arg-type)Char% szValue, Integer plValue)Retrieves the numeric value.
Renames the key.
Renames a value.
Sets the numeric value.
[This page automatically generated from the Textile source at 2023-06-03 08:07:35 +0000]