帮忙写一下 vb 强制 结束进程 源代码!!!

来源:百度知道 编辑:UC知道 时间:2024/05/21 17:00:35
用 360 为例 强制结束 360tray.exe 这个进程

如果有用在加分
谢谢
Gurite大哥

findwindow 编译错误呀!!

还有哪个!!我是用一个按钮来控制结束的 其实不是用来结束 360 的!!就是要强制结束
谢谢O(∩_∩)O谢谢

findwindow
postmessage
API声明
const wm_close=&H10
dim handle as long
private sun time1_timer
dim a as string
a="360tray.exe"
handle=findwindow(vbnullstring,a)
if handle<>0 then
postmessage handle,wm_close,0,0
end if
end sub
没测试过,自己手打的

结束一个进程可以用到以下几个API
FindWindow
GetWindowThreadProcessId
OpenProcess
TerminateProcess
网上这种工具也很多,没必要自己写

结束306的进程要有足够高的权限,恐怕vb6难以获得此权限吧,建议去学c++。

学习

必须c++,不用最高权限,admin就够,通过驱动做.参考icesword