| |
|
|
|
Description:
RegEnumKey Listet Untereschlüssel one Registryschlüssels on. The function watts to compatibility with windows3.1 receive and functions To XP furthermore. there The API RegEnumKeyEx further data the Key supplying can, ought to these uses go.
Deklaration:
Def RegEnumKey(4) !ADVAPI32,RegEnumKeyA
Parameter:
1.Parameter: lever one opened Keys (which Unterschlüssel one lists would like) as LongInt or following values => -HKEY_CLASSES_ROOT = $80000000 -HKEY_CURRENT_USER = $80000001 -HKEY_LOCAL_MACHINE = $80000002 -HKEY_USERS = $80000003 2.Parameter: position the sought Unterschlüssels in the Registry as LongInt. 3.Parameter: Memory-Variable, The whom names the Unterschlüssels receiving. 4.Parameter: Size the Memory-Variables of Parameter 3 in Bytes as LongInt.
Return Value:
0 if one Key read watts, otherwise <>0 (Errorcode).
Examples:
CompileMarkSeparationDef RegOpenKeyEx(5) !"ADVAPI32","RegOpenKeyExA"
Def RegEnumKey(4) !"ADVAPI32","RegEnumKeyA"
Def RegCloseKey(1) !"ADVAPI32","RegCloseKey"
Windowstyle 31
Windowtitle "Registry Unterschlüssel listen"
Window 0,0-640,440
declare ergebnis#,Error&,Handle&,Key$,Zähler%
dim Ergebnis#,255--Länge des zu erwartenden Namens
Key$="Software"
$80000001=HKEY_CURRENT_USER $F003F = KEY_ALL_ACCESS
Error&=RegOpenKeyEx($80000001,addr(Key$),0,$F003F,addr(Handle&))
PRINT "OpenKey (0=OK) : ",Error&
whilenot Error&
Error&=RegEnumKey(Handle&,Zähler%,Ergebnis#,100)
casenot Error& : ADDSTRING string$(Ergebnis#,0)
inc Zähler%
endwhile
RegCloseKey(Handle&)
dispose Ergebnis#
@Listbox$("Unterschlüssel von Software",1 class=s2>)
|
|
|
| |
|
|