| |
|
|
|
Description:
declared RegCreateKey created a Registryschlüssel, opens it and supply the lever back. is this Key already present, becomes it opened. The function watts to compatibility with windows3.1 receive and functions To XP furthermore. there The API RegCreateKeyEx The Possibility bid NT-based Systemen too Zugriffsrechte To give away, ought to one rather RegCreateKeyEx using.
Deklaration:
DEF @RegCreateKey(3)!ADVAPI32,RegCreateKeyA
Parameter:
1.Parameter: lever one already opened Keys as LongInt or following vordefinierte values => -HKEY_CLASSES_ROOT = $80000000 -HKEY_CURRENT_USER = $80000001 -HKEY_LOCAL_MACHINE = $80000002 -HKEY_USERS = $80000003 2.Parameter: address one Unterschlüssels or Memory-Variable with a Unterschlüssel, the created or/and opened go should. 3.Parameter: 4 byte Memory-Variable, The the lever the Keys aufnimmt.
Return Value:
0 with success, with failure one worth <>0 (Error Code).
Examples:
Declare lever#,FEHLER&,Key#,name#,worth#,Size#,Type#
DEF @RegCloseKey(1) !"ADVAPI32","RegCloseKey"
DEF @RegSetValueEx(6) !"ADVAPI32","RegSetValueExA"
DEF @RegCreateKey(3)!"ADVAPI32","RegCreateKeyA"
DEF @RegDeleteKey(2) !"ADVAPI32","RegDeleteKeyA"
DEF @RegDeleteValue(2) !"ADVAPI32","RegDeleteValueA"
Windowstyle 31
Windowtitle "Registryschlüssel erstellen"
Window 0,0-640,440
DIM Key#,260
DIM lever#,4
DIM name#,250
DIM Size#,4
DIM worth#,260
Dim Type#,4
String Key#,0="SoftwareAH Test"
LET Fehler&=@RegCreateKey($80000001,Key#,lever#)
Print "Fehlercode at create/Öffenen the Schlüssels SoftwareAH Test: ";Fehler&
IF Fehler&=0
Print "Fehlercode RegCloseKey: ";@RegCloseKey(@Long(lever#,0))
Endif
Dispose Type#
Dispose worth#
Dispose key#
Dispose lever#
Dispose name#
Dispose Size#
While 0=0
Waitinput
wend
|
|
|
| |
|
|