|
Previous Top Next |
Prototype: | (Long pRoot, String pKeyname, <String pValuename>, <*LONG pValuetype>, Byte pUseBits=0),ANY |
pRoot | The root key. Valid values are: IT_HKEY_CLASSES_ROOT, IT_HKEY_CURRENT_USER, IT_HKEY_LOCAL_MACHINE, IT_HKEY_USERS, IT_HKEY_PERFORMANCE_DATA, IT_HKEY_CURRENT_CONFIG or IT_HKEY_DYN_DATA. |
pKeyname | The registry key to enumerate keys for. Example: 'SOFTWARE\SoftVelocity\Clarion8' |
pValuename | Name of the value to retrieve information from |
pValuetype | Optional LONG variable passed by address that will receive the datatype information. |
pUseBits | Indicates if the information should be fetched from the 32 or 64 bit sections of the registry or default (virtualized through WoW64 subsystem) Valid values are: 0 (default), 32 (force 32bit) and 64 (force 64bit) |
Returns | Returns data from the registry. This data can be a STRING, CSTRING, IT_DWORD or IT_ULARGE_INT |
This method works for most parts exactly like the built-in GETREG function in the Clarion runtime library, with one major difference: GetRegEx can query both 32 and 64bit keys on 64bit operating systems. This allows you to bypass the WoW64 subsystem and query the keys directly, i.e. query 64 bit keys from a 32 bit program without the WoW64 system redirecting them to the 32 keys. This can be very helpful when accessing information stored by native 64bit programs or .NET programs that run as 64bit under 64bit operating systems.
Example:
ITR ITRegistryClass
KeyValue String(255)
REG Long
Code
REG = REG_SZ
KeyValue = ITR.GetRegEx(REG_LOCAL_MACHINE, 'SOFTWARE\Icetips Test', 'Test_REG_DWORD', REG, 64)
See also:
GetValueType
QueryValue
OpenRegistryKey
CloseRegistryKey