|
Previous Top Next |
Prototype: | (UNSIGNED pMasterKey, String pRegKey, Byte pUseBits=0),Long,PROC |
pMasterKey | 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. |
pRegKey | The registry key to enumerate keys for. Example: 'SOFTWARE\SoftVelocity\Clarion8' |
pUseBits | Indicates if the enumeration should be forced to use 32 or 64 bit values or default (virtualized through WoW64 subsystem) Valid values are: 0 (default), 32 (force 32bit) and 64 (force 64bit) |
Returns | The method returns the number of keys enumerated, i.e. the number of records in the RegistryKey property. |
This method uses RegEnumKeyEx api to enumerate all subkeys from the specified key. Note that this method is not recursive, i.e. it will not enumerate sub-keys of the sub-keys. You can use the IT_HKEY_ equates or the REG_ equates from Clarion equates.clw, either will work. The IT_HKEY_ equates have the same names as the equates used by the Windows APIs except for the "IT_" prefix. This method 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
Code
ITR.EnumRegistrySubKeys(REG_LOCAL_MACHINE,'SOFTWARE\Microsoft\.NETFramework')) !! Enumerate .NET information
See also: