先获得进程列表:
function TServerForm.Get_Process_List: string;
var
sl : TStringList;
begin
sl := TStringList.Create;
EnumWindows(@EnumWinProc, integer(sl));
Result := sl.Text;
sl.Free;
end;
在结束进程:
procedure TProcListForm.CloseWinButClick(Sender: TObject);
begin
with (Owner as TClientForm) do begin
SendMsg(MSG_CLOSE_WIN, ProcList.Items[ProcList.ItemIndex], ClientSocket1.Socket);
end;
end;procedure TProcListForm.KillButClick(Sender: TObject);
begin
with (Owner as TClientForm) do begin
SendMsg(MSG_KILL_WIN, ProcList.Items[ProcList.ItemIndex], ClientSocket1.Socket);
end;
end;
function TServerForm.Get_Process_List: string;
var
sl : TStringList;
begin
sl := TStringList.Create;
EnumWindows(@EnumWinProc, integer(sl));
Result := sl.Text;
sl.Free;
end;
在结束进程:
procedure TProcListForm.CloseWinButClick(Sender: TObject);
begin
with (Owner as TClientForm) do begin
SendMsg(MSG_CLOSE_WIN, ProcList.Items[ProcList.ItemIndex], ClientSocket1.Socket);
end;
end;procedure TProcListForm.KillButClick(Sender: TObject);
begin
with (Owner as TClientForm) do begin
SendMsg(MSG_KILL_WIN, ProcList.Items[ProcList.ItemIndex], ClientSocket1.Socket);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货