| |
|
|
 |
Description:
RegQueryValueEx reads whom type and the data one one Wertes from the Registry from.
Deklaration:
Def @RegQueryValueEx(6) !ADVAPI32,RegQueryValueExA
Parameter:
1.Parameter: lever the Registryschlüssels, the the value contains as LongInt.
2.Parameter: address one Strings with the names the auszulesenden Wertes or a Memory-Variable, The this names contains.
3.Parameter: reserved, must 0 his.
4.Parameter: Memory-Variable, The whom type the ausgelesenen Wertes receiving (can 0 his) => -$3 = Binärer Key (Bytefolge unterschiedlicher Size). -$4 = 4 byte or LongIntwert. often go only The two oberen Bytes the Wertes berücksichtigt. -$5 = 4 byte or LongIntwert. The downstairs 2 byte the Wertes go berücksichtigt. -$2 = String with abschließendem Nullbyte. can Enviroment-Variables include. -$6 = One symbolischer Link in the Unicode stature. -$7 = One aray nullterminierter Strings. -$0 = not definierter Datentyp. -$8 = driver Resourcenliste. -$1 = String with abschließendem Nullbyte without Enviroment-Variables.
5.Parameter: Bereichvariable, The the value receiving.
6.Parameter: 4 byte Bwereichsvariable. this worth must on The Size the Bereichs in Parameter 4 staid go. If the function zurückkehrt, standing here The length the ausgelesenen Wertes in Bytes.
Return Value:
0 with success, with failure one worth <>0 (Error Code).
Examples:
Declare lever#,FEHLER&,Key#,name#,worth#,Size#,Type#
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 lever#,4
DIM name#,250
DIM Size#,4
DIM worth#,260
Dim Type#,4
String key#,0="SoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders"
LET FEHLER&=@RegOpenKeyEx($80000001,Key#,0,$F003F,lever#)
Print "Fehlercode at Öffenen the Schlüssels User Shell Folders: ";Fehler&
IF Fehler&=0
String name#,0="Start Menu"
long Size#,0=260
Let Fehler&=@RegQueryValueEx(@Long(lever#,0),name#,0,Type#,worth#,Size#)
Print "Fehlercode at Reading the Schlüssels: ";Fehler&
Print ""
Print "Das Startmenü the current Users standing here: "
Print @String $(worth#,0)
Print "Typ the Schlüssels: ";@Long(Type#,0)
Print "Länge the Wertes: ";@Long(Size#,0);" Bytes"
Print ""
Print "Fehlercode RegCloseKey: ";@RegCloseKey(@Long(lever#,0))
endif
IF Fehler&<>0
String key#,0="SoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders"
LET FEHLER&=@RegOpenKeyEx($80000001,Key#,0,$F003F,lever#)
Print "Fehlercode at Öffenen the Schlüssels Shell Folders: ";Fehler&
String name#,0="Start Menu"
long Size#,0=260
Let Fehler&=@RegQueryValueEx(@Long(lever#,0),name#,0,Type#,worth#,Size#)
Print "Fehlercode at Reading the Schlüssels: ";Fehler&
Print ""
Print "Das Startmenü the current Users standing here: "
Print @String $(worth#,0)
Print "Typ the Schlüssels: ";@Long(Type#,0)
Print "Länge the Wertes: ";@Long(Size#,0);" Bytes"
Print ""
Print "Fehlercode RegCloseKey: ";@RegCloseKey(@Long(lever#,0))
endif
IF Fehler&<>0
Print "Error!!!!!! Startmenü couldn't read go!!!"
endif
Dispose Type#
Dispose worth#
Dispose key#
Dispose lever#
Dispose name#
Dispose Size#
While 0=0
Waitinput
wend
|
|
|
| |
|
|