this slowpoke moves

Get Complete Tasklist

uses TLHelp32

procedure TForm1.Button1Click(Sender: TObject);
var
  MyHandle: THandle;
  Struct: TProcessEntry32;
begin
  Memo1.Clear;
  try
    MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
    Struct.dwSize:=Sizeof(TProcessEntry32);
    if Process32First(MyHandle, Struct) then
      Memo1.Lines.Add(Struct.szExeFile);
    while Process32Next(MyHandle, Struct) do
      Memo1.Lines.Add(Struct.szExeFile);
  except
    ShowMessage('Error showing process list');
  end;
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate