| |
|
|
|
Description:
RegOpenKeyEx opens a Registry Key and supply which lever to edit or to that Reading.
Deklaration:
Def @RegOpenKeyEx(5) !ADVAPI32,RegOpenKeyExA
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 opened go should. 3.Parameter: reserved, must 0 his. 4.Parameter: which grabbed would like one on the Key having? values can with | add go. -$0020 = i will a symbolischen Link produce. -$0004 = i will a Unterschlüssel produce. -$0008 = i will Unterschlüssel List. -$20019 = i will only read. -$0010 = activate The Änderungsbenachrichtigung for Key. -$0001 = allows, that Unterschlüssel quizzed go. -$0002 = allows the write of Values in Unterschlüssel. -$F003F = any types of Zugriffen. -$20006 = Kompletter Schreibzugriff. 5.Parameter: 4 byte Memory-Variable, The the lever the Keys aufnimmt.
Return Value:
0 with success, with failure one worth <>0 (Error Code).
Examples:
CompileMarkSeparationDeclare Handle#,FEHLER&,Key#,Name#,Wert#,Size#
def @RegOpenKeyEx(5) !"ADVAPI32","RegOpenKeyExA"
def @RegQueryValueEx(6) !"ADVAPI32","RegQueryValueExA"
def @RegCloseKey(1) !"ADVAPI32","RegCloseKey"
Windowstyle 31
Windowtitle "Aus Registry Startmenüname auslesen"
Window 0,0-640,440
DIM Key#,260
DIM Handle#,4
DIM Name#,250
DIM Size#,4
DIM Wert#,260
String key#,0="SoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders"
LET FEHLER&=@RegOpenKeyEx($80000001,Key#,0,$F003F,Handle#)
Print "Fehlercode beim Öffenen des Schlüssels User Shell Folders: ";Fehler&
IF Fehler&=0
String Name#,0="Start Menu"
long Size#,0=260
Let Fehler&=@RegQueryValueEx(@Long(Handle#,0),Name#,0,0,Wert#,Size#)
Print "Fehlercode beim Auslesen des Schlüssels: ";Fehler&
Print ""
Print "Das Startmenü des aktuellen Users steht hier: "
Print @String$(Wert#,0)
Print ""
Print "Fehlercode RegCloseKey: ";@RegCloseKey(@Long(Handle#,0))
endif
IF Fehler&<>0
String key#,0="SoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders"
LET FEHLER&=@RegOpenKeyEx($80000001,Key#,0,$F003F,Handle#)
Print "Fehlercode beim Öffenen des Schlüssels Shell Folders: ";Fehler&
String Name#,0="Start Menu"
long Size#,0=260
Let Fehler&=@RegQueryValueEx(@Long(Handle#,0),Name#,0,0,Wert#,Size#)
Print "Fehlercode beim Auslesen des Schlüssels: ";Fehler&
Print ""
Print "Das Startmenü des aktuellen Users steht hier: "
Print @String$(Wert#,0)
Print ""
Print "Fehlercode RegCloseKey: ";@RegCloseKey(@Long(Handle#,0))
endif
IF Fehler&<>0
Print "Fehler!!!!!! Startmenü konnte nicht ausgelesen werden!!!"
endif
Dispose Wert#
Dispose key#
Dispose Handle#
Dispose Name#
Dispose Size#
While 0=0
Waitinput
href='./../../function-references/XProfan/wend/'>wend
|
|
|
| |
|
|