| |
|
|
|
Description:
RegDeleteKey deletes a Registryschlüssel. under windows NT-based Systemen can The function no Key delete, The Unterschlüssel having!
Deklaration:
DEF @RegDeleteKey(2) !ADVAPI32,RegDeleteKeyA
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 deleted go should.
Return Value:
0 with success, with failure one worth <>0 (Error Code).
Examples:
CompileMarkSeparationDeclare Handle#,FEHLER&,Key#,Name#,Wert#,Size#,Type#,Button&
DEF @RegCloseKey(1) !"ADVAPI32","RegCloseKey"
DEF @RegCreateKey(3)!"ADVAPI32","RegCreateKeyA"
DEF @RegDeleteKey(2) !"ADVAPI32","RegDeleteKeyA"
Windowstyle 31
Windowtitle "Registryschlüssel erstellen"
Window 0,0-640,440
Let Button&=@Createbutton(%HWND,"Schlüssel löschen",20,300,200,30)
DIM Key#,260
DIM Handle#,4
DIM Name#,250
DIM Size#,4
DIM Wert#,260
Dim Type#,4
String Key#,0="SoftwareAH Test"
LET Fehler&=@RegCreateKey($80000001,Key#,Handle#)
Print "Fehlercode beim Erstellen/Öffenen des Schlüssels SoftwareAH Test: ";Fehler&
IF Fehler&=0
Print "Fehlercode RegCloseKey: ";@RegCloseKey(@Long(Handle#,0))
Endif
Dispose Type#
Dispose Wert#
Dispose key#
Dispose Handle#
Dispose Name#
Dispose Size#
While 0=0
Waitinput
If @Getfocus(Button&)
DIM Key#,260
Print ""
String Key#,0="SoftwareAH Test"
LET Fehler&=@RegDeleteKey($80000001,Key#)
Print "Fehlercode beim Löschen des Schlüssels SoftwareAH Test: ";Fehler&
Dispose key#
@SetFocus(%HWND)
endif
wend
|
|
|
| |
|
|