|
|
|
| 19 February 2002 | ArrayEnumKey() |
| Author | Jens Meyer (sealeopard@usa.net) |
| Action | Creates an array of names of the subkeys contained in a registry key or subkey. |
| Syntax | ArrayEnumKey ($subkey) |
| Parameters | |
| Remarks | see http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000064 |
| Returns | Array containing the list of subkeys |
| Dependencies | None. |
| Examples |
$retcode=arrayenumkey('HKEY_USERS')
|
| Source |
FUNCTION ArrayEnumKey ($regsubkey)
DIM $retcode, $subkeycounter, $currentsubkey, $subkeyarray
IF NOT KeyExist($regsubkey)
$arrayenumkey=''
RETURN
ENDIF
$subkeycounter=0
DO
$currentsubkey=EnumKey($regsubkey,$subkeycounter)
IF ($currentsubkey <> 259) AND @error = 0
REDIM PRESERVE $subkeyarray[$subkeycounter]
$subkeyarray[$subkeycounter]=$currentsubkey
$subkeycounter=$subkeycounter+1
ENDIF
UNTIL ($currentsubkey = 259) OR @error
$arrayenumkey=$subkeyarray
ENDFUNCTION ; - ArrayEnumKey -
|
|
|
|