English
Regulars table & Café

RegQueryValueEx.

 


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

 
03/17/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.761 Views

Untitledvor 0 min.

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie