Rapid-Q Documentation by William Yu (c)1999 Appendix A: QREGISTRY

QREGISTRY Component

QRegistry encapsulates functions that operate on the Window's system registry.

QRegistry Properties
FieldTypeR/WDefault
CurrentKeyINTEGERR
CurrentPathSTRINGR
GetDataSizeINTEGERR
GetDataTypeINTEGERR
HasSubKeysINTEGERR
KeyItemCountINTEGERR
ValueItemCountINTEGERR
RootKeyINTEGERRWHKEY_CURRENT_USER

QRegistry Methods
MethodTypeDescriptionParams
CloseKeySUBCloses opened key0
CreateKeyFUNCTION (Key$) AS INTEGERCreates a new key in CurrentPath.1
DeleteKeyFUNCTION (Key$) AS INTEGERDeletes key.1
DeleteValueFUNCTION (ValName$) AS INTEGERDeletes a value data.1
KeyExistsFUNCTION (Key$) AS INTEGERReturns 0 or 1 if key exists.1
KeyItemFUNCTION (Index%) AS STRINGRetrieve the names of the subkeys1
MoveKeyFUNCTION (Old$, New$, Delete%)Moves existing key, subkeys, and data values.3
OpenKeyFUNCTION (Key$, CanCreate%)CanCreate specifies whether to create the specified key if it does not exist.2
ReadBinaryFUNCTION (Key$, Index%) AS BYTEReturn binary value of specified key2
ReadFloatFUNCTION (Key$) AS DOUBLEReturn double value of specified key1
ReadIntegerFUNCTION (Key$) AS INTEGERReturn integer value of specified key1
ReadStringFUNCTION (Key$) AS STRINGReturn string value of specified key1
RegistryConnectFUNCTION (CompName$) AS INTEGEREstablishes connection to another computer's registry.1
RenameValueFUNCTION (Old$, New$) AS INTEGERRenames existing data value.2
ValueExistsFUNCTION (Value$) AS INTEGERReturns 0 or 1 if data value Value$ exists.1
ValueItemFUNCTION (Index%) AS STRINGRetrieve the names of the data values1
WriteBinarySUB (Key$, BYTE(), Size%)Write Array of BYTEs in the specified key3
WriteFloatSUB (Key$, Value#)Write double value in the specified key2
WriteIntegerSUB (Key$, Value&)Write integer value in the specified key2
WriteStringSUB (Key$, Value$)Write string in the specified key2

QRegistry Events
EventTypeOccurs when...Params


QRegistry Examples
'  Detect if your computer is connected to the internet

Const HKEY_LOCAL_MACHINE = &H80000002

DIM Registry AS QRegistry

Registry.RootKey = HKEY_LOCAL_MACHINE
Registry.OpenKey("System\CurrentControlSet\Services\RemoteAccess", 0)

IF Registry.ReadBinary("Remote Connection", 0) = 1 THEN
  ShowMessage("You're connected!")
ELSE
  ShowMessage("You're not connected!")
END IF

Prev Component Contents Next Component
D>