Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Problem mit Listbox und Typen (https://www.delphipraxis.net/115598-problem-mit-listbox-und-typen.html)

wadimwadim 15. Jun 2008 13:49

Re: Problem mit Listbox und Typen
 
Ey bei mir ist sitzt hier Problem auf Problem...
Möchte erreichen, dass ich die Listbox zuerst leere, bevor da was draufgeschrieben wird. (Listbox1.Clear;)

Delphi-Quellcode:

procedure TForm1.Button2Click(Sender: TObject);
var
  i, ii, Anzahl, Er : Integer;
  NextScan: array [0..10000] of String;
  Processhandle: THandle;
  WindowHandle, Pidi,
  EndMemHex,
  Sets :                Integer;
  Wert :DWORD ;
  NextInt: array [0..10000] of Integer;
  NextInt_: array [0..10000] of Integer;
  lbuf: array [0..10000] of Integer;

begin
WindowHandle :=FindWindow(nil,'Guild Wars');
Anzahl:= Listbox1.Items.Count;
For i:= 0 to Anzahl -1 do
  begin
  NextScan[i]:= '$' + Listbox1.Items[i];
  NextInt[i]:= StrToInt(NextScan[i]);
  GetWindowThreadProcessId(WindowHandle ,@Pidi);
  ProcessHandle :=OpenProcess(PROCESS_VM_READ ,False , pidi);
  ReadProcessMemory(Processhandle ,ptr(NextInt[i]),@lBuf[i],4,Wert);
  //Listbox1.Clear; soll mir die Listbox leeren  wo soll ich das reinschreiben?
  If lbuf[i] = SuchS Then
    Listbox1.Items.Add(IntToHex(NextInt[i],8));
  end;
end;
Listenindex wird überschritten(Fehlermeldung), falls ich es da reinschreib.

mkinzler 15. Jun 2008 13:52

Re: Problem mit Listbox und Typen
 
Am Anfang. Allerdings solltest du dann die Schleife anders deklarieren.

wadimwadim 15. Jun 2008 13:54

Re: Problem mit Listbox und Typen
 
Vor der Schleife? Oder wo? und was muss ich ändern... die ist doch richtig


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:34 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz