Introduction - If you have any usage issues, please Google them yourself
procedure TProcessDelForm.EndProcessBtnClick(Sender: TObject)
var
Li: TListItem
Ls:TStrings
P: PPluginsItemInfo
ID,i:Integer
begin
Ls:=TStringlist.Create
EnablePrivilege(GetCurrentProcess, SeDebugPrivilege , True)
for i:=0 to ProListView.Items.Count-1 do
begin
Li:=ProListView.Items[i]
if Li <> nil then
begin
P:= PPluginsItemInfo(Li.Data)
if P^.CheckState= NODESTATE_CHECKED then
begin
Ls.Add(P^.PID)
end
end
end
for i:=0 to Ls.Count-1 do
begin
try
ID:=Strtoint(Ls.Strings[i])
KillProc(ID)
sleep(200)
CloseProcess(ID)
finally
end
end
FPEdit.Text:=
DesEdit.Text:=
ComEdit.Text:=
Ls.Free
end