Autor Beitrag
Hendi48
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271



BeitragVerfasst: Di 12.06.07 19:53 
Hallo,
ich brauch mal wieder Hilfe. Also ich habe einen Loader gemacht, und der schreibt 'safed' = true in die Registry.
Im eigentlichen Programm soll dann geprüft werden ob safed true oder false ist und wenn true dann soll das Programm weiter laden und wenn nich Application.Terminate . Dann hab ich das so gemacht, aber er gibt mir immer die Message und startet nicht, obwohl es in der registry auf true is.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
procedure integritycheck;
var
reg: TRegistry;
unIsafe: Boolean;
begin;
   Reg:=TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    if Reg.OpenKey('SOFTWARE\iCheat',false) then
    unIsafe:=reg.ReadBool('Safed');
  except
    unIsafe:=false;
  end;

  if not reg.KeyExists('Safed')  then
       showmessage('pl0x run iCheat.exe!');
    //Close;
       Application.Terminate;


   if unIsafe then
  begin
    showmessage('pl0x run iCheat.exe!');
    //Close;
    Application.Terminate;
  end;
end;
Hendi48 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271



BeitragVerfasst: Di 12.06.07 20:54 
OK, das hab ich geändert, aber es liegt glaub ich hier dran:

ausblenden Delphi-Quelltext
1:
2:
3:
  if not reg.KeyExists('Safed')  then
       showmessage('pl0x run iCheat.exe!');
       Application.Terminate;


Wenn ich den code rauscommente dann klappts :shock:

Edit: WTF, gelöscht? War meins doch richtig?
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Di 12.06.07 20:56 
Da fehlen 1. einmal Begin und end, und du hast nen fehler in der Logik, wenn safed true ist, ist isUnsafe true, was ja aber not sein:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
procedure integritycheck;
var
reg: TRegistry;
unIsafe: Boolean;
begin;
   Reg:=TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    if Reg.OpenKey('SOFTWARE\iCheat',false) then
    unIsafe:=reg.ReadBool('Safed');
  except
    unIsafe:=false;
  end;

  if not reg.KeyExists('Safed')  then
  begin
       showmessage('pl0x run iCheat.exe!');
    //Close;
       Application.Terminate;
  end

   if not unIsafe then
  begin
    showmessage('pl0x run iCheat.exe!');
    //Close;
    Application.Terminate;
  end;
end;

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Hendi48 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271



BeitragVerfasst: Di 12.06.07 21:03 
is wie vorher, wenn ich wieder if not reg.KeyExists('Safed')usw. rauscommente gehts, mit kommt fehler obwohl safed exisitert