Çalışma anındaki programların listesini görüntüler
PHP Kodu:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, TlHelp32;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
MyHandle: THandle;
Struct: TProcessEntry32;
begin
MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROC ESS, 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);
end;
end.