www.icetips.com  Icetips Utilities Documentation 1/23/2012    

Registry Class: GetRegEx

Previous  Top  Next  


Prototype: (Long pRoot, String pKeyname, <String pValuename>, <*LONG pValuetype>, Byte pUseBits=0),ANY

 

pRootThe 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.
pKeynameThe registry key to enumerate keys for.  Example:  'SOFTWARE\SoftVelocity\Clarion8'
pValuenameName of the value to retrieve information from
pValuetypeOptional LONG variable passed by address that will receive the datatype information.
pUseBitsIndicates 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)

 

ReturnsReturns 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

 



Direct link to this page: http://www.icetips.com/manuals/utilities/getregex_registryclass.htm