' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' Qregistry ****** QREGISTRY Component ****** QRegistry encapsulates functions that operate on the Window's system registry. QRegistry Properties Field Type R/W Default =================== =================== =================== =================== CurrentKey INTEGER R CurrentPath STRING R GetDataSize INTEGER R GetDataType INTEGER R HasSubKeys INTEGER R KeyItemCount INTEGER R ValueItemCount INTEGER R RootKey INTEGER RW HKEY_CURRENT_USER QRegistry Methods Method Type Description Params =================== =================== =================== =================== CloseKey SUB Closes opened key 0 CreateKey FUNCTION (Key$) AS Creates a new key 1 INTEGER in CurrentPath. DeleteKey FUNCTION (Key$) AS Deletes key. 1 INTEGER DeleteValue FUNCTION (ValName$) Deletes a value 1 AS INTEGER data. KeyExists FUNCTION (Key$) AS Returns 0 or 1 if 1 INTEGER key exists. KeyItem FUNCTION (Index%) Retrieve the names 1 AS STRING of the subkeys MoveKey FUNCTION (Old$, Moves existing key, New$, Delete%) subkeys, and data 3 values. OpenKey CanCreate specifies FUNCTION (Key$, whether to create CanCreate%) the specified key 2 if it does not exist. ReadBinary FUNCTION (Key$, Return binary value 2 Index%) AS BYTE of specified key ReadFloat FUNCTION (Key$) AS Return double value 1 DOUBLE of specified key ReadInteger FUNCTION (Key$) AS Return integer INTEGER value of specified 1 key ReadString FUNCTION (Key$) AS Return string value 1 STRING of specified key RegistryConnect FUNCTION Establishes (CompName$) AS connection to 1 INTEGER another computer's registry. RenameValue FUNCTION (Old$, Renames existing 2 New$) AS INTEGER data value. ValueExists FUNCTION (Value$) Returns 0 or 1 if AS INTEGER data value Value$ 1 exists. ValueItem FUNCTION (Index%) Retrieve the names 1 AS STRING of the data values WriteBinary SUB (Key$, BYTE(), Write Array of Size%) BYTEs in the 3 specified key WriteFloat Write double value SUB (Key$, Value#) in the specified 2 key WriteInteger SUB (Key$, Write integer value Value&) in the specified 2 key WriteString SUB (Key$, Value$) Write string in the 2 specified key QRegistry Events Event Type Occurs 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 ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb