Einzelnen Beitrag anzeigen

Benutzerbild von Tommi
Tommi

Registriert seit: 23. Mai 2003
27 Beiträge
 
Delphi 3 Professional
 
#3

Re: [TRegistry, D3] "Ungültiger Datentyp"

  Alt 1. Jul 2004, 20:48
Code:
procedure LoadProfile0;
var reg : TRegistry;
    size : integer;
Begin
     reg := TRegistry.Create;
     reg.RootKey := HKEY_LOCAL_MACHINE;
     Profile0 := StringOfChar(#00,177);
     If reg.OpenKey ( device_key, false ) Then
     Begin
          Form1.StaticText1.Caption := Form1.StaticText1.Caption + device_key;
          reg.ReadBinaryData('Profile0', Profile0[1], 177 );
          Form1.StaticText3.Caption := Profile0;
     End;
     reg.CloseKey;
     reg.free;
End;
Ich weiß, es ist "quick'n'dirty" ohne Fehlerkontrolle, aber ich will mir eh nur ein Tool für den Heimgebrauch basteln.

device_key ist der Schlüssel mitsamt Pfad zum WLAN-Eintrag (Marke Realtek), welcher zuvor in einer anderen Prozedur ermittelt wird. Sinn und Zweck des Programms soll das automatische Abändern des WEP-Passphrases sein, um das WLAN ein bissl sicherer zu machen...


EDIT: die Variable Profile0 ist global vom Typ string...
  Mit Zitat antworten Zitat