The following code includes classes registry, regkey, regkeys, regvalue and regvalues. All together they provide view, read, write and delete functionality for the System Registry. Examples showing how to use this class are coming soon.
Create Registry object before using any other class from this library. This object contains API declarations the other classes use.
LOCAL rg As Registry
rg = CREATEOBJECT("Registry")
The next snip opens Software key in HKEY_LOCAL_MACHINE and adds _test subkey to it.
LOCAL rgkey As regkey
rgkey = CREATEOBJECT("regkey",;
HKEY_LOCAL_MACHINE, "Software")
WITH rgkey
IF .OpenKey()
.CreateSubkey("_test", "")
ENDIF
ENDWITH
And the last one adds several values to a key.
WITH rgkey
IF .OpenKey()
.SetValue("TestValue0", 0, 16) && REG_NONE
.SetValue("TestValue1", 1, "abc") && REG_SZ
.SetValue("TestValue3", 3, "abc") && REG_BINARY
.SetValue("TestValue4", 4, "128") && REG_DWORD
ENDIF
ENDWITH
|