一发现qq2000b.exe运行,就把它关掉
解决方案 »
- Com难题,高手请进!
- 文件操作问题:改名,删除,移动
- 如何将16进制的颜色字符串转化为TColor
- 关于应用程序连接sql server2000数据库问题----在线等待
- 小弟对Delphi一无所知,请各位GG、JJ请帮忙!!!
- 在线等待...还是dbedit(edit)的设计问题?
- 获得操作系统是 98 还是 2000?
- 关于TDBEdit
- bde链接时,有没有办法去掉总是出现的login数据库的窗口?
- 怎样改变stringgrid的Cells[1,0]显示的字付窜对齐方式
- 有没有人用delphi做过把oracle中的表转换成dbf?如解决加分500!
- 如何得到系统动态分配的一个tcp端口?
关闭某个程序: lppe:tprocessentry32;
sshandle:thandle;
hh:hwnd;
found:boolean;begin
//关闭***.exe
sshandle:=createtoolhelp32snapshot(TH32CS_SNAPALL,0);
found:=process32first(sshandle,lppe);
// str:=extractfilepath(paramstr(0))+'client.exe';
while found do
begin
//进行你的处理其中lppe.szExefile就是程序名。
str:=uppercase(extractfilename(lppe.szExeFile));
if str='***.EXE' then
begin
hh:=OpenProcess(PROCESS_ALL_ACCESS,true,lppe.th32ProcessID);
TerminateProcess(hh,0);
end;
found:=process32next(sshandle,lppe);
end;
只要用spy++ 或winsight找到qq的类名就可以了
谢谢大家。