procedure TForm1.Button1Click(Sender: TObject);
var
lppe:TProcessEntry32;
found:boolean;
Hand:THandle;
begin
Hand:=CreateToolhelp32Snapshot(TH32CS_SNAPALL,0); lppe.dwSize := Sizeof(lppe); //初始化
found:=Process32First(Hand,lppe);
while found do
begin
ListBox1.Items.Add(StrPas(lppe.szExeFile));//列出所有进程。
found:=Process32Next(Hand,lppe);
end; end;
编译的时候IDE报 [DCC Error] DownMov.pas(444): E2129 Cannot assign to a read-only property 位置就是在while found do 和 found:=Process32Next(Hand,lppe);这里
我的IDE是XE SP1
把found改名为bfound呢?