Autor Beitrag
schitho
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 288

XP Home SP2
D2005 Prof
BeitragVerfasst: So 17.08.03 18:46 
Hi,

könnt Ihr mir sagen, weshalb ich hier immer eine Fehlermeldung beim Aufruf von GetKeyNames bekomme (Exception)? :cry:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
  
  regist:=TRegistry.Create;
  regist.RootKey:=HKEY_CURRENT_USER;
  regist.OpenKey('Software', false);
  try
    regist.GetKeyNames(TSid);
  finally
    regist.free;
  end;
  showMessage(TSid[0]);


Danke!

_________________
(Sorry! Leider ewiger Delphi-Neuling)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 17.08.03 18:52 
Du mußt eine Stringliste übergeben.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 17.08.03 18:53 
Hallo wenn ich in meine Hilfe gugge erwartet getkeynames ein TStrings-Objekt.
hast du TSid irgendwo erstellt?

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
schitho Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 288

XP Home SP2
D2005 Prof
BeitragVerfasst: So 17.08.03 18:56 
Auf die Gefahr hin, dass ich mich nun blamiere: :shock:

TSid hab ich als TStrings definiert. Das müsste doch gehen, oder?

_________________
(Sorry! Leider ewiger Delphi-Neuling)
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 17.08.03 19:02 
ich hab dich gefragt, ob du es erstellt hast, nicht nur definiert :wink:
schreib ein
ausblenden Delphi-Quelltext
1:
Tsid:=Tstringlist.create;					

bevor du draufzugreifst und vergiß das Tsid.free nicht.

du solltest deine objekte nicht mit T beginnen lassen, das T schreibt man immer bei den klassen vorndran

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
schitho Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 288

XP Home SP2
D2005 Prof
BeitragVerfasst: So 17.08.03 19:23 
Danke! :D

_________________
(Sorry! Leider ewiger Delphi-Neuling)