怎么停止进程?(各种windows操作系统)(50分)

L

llk

Unregistered / Unconfirmed
GUEST, unregistred user!
要删除一个应用程序,但他正在运行,
怎么停止进程?(各种windows操作系统)
 
renname
delete
 
to cxz9
具体点,我很菜
 
to cxz9:
瞎说
 
通过调用windows api kill这个进程先,但我不知道是哪一个api。
我想你自己查msdn应该可以找到吧。
 
BOOL TerminateProcess(
HANDLE hProcess, // handle to the process
UINT uExitCode // exit code for the process
);
 
用这个API函数
——————————————————————————
Function TerminateProcess Lib "kernel32" Alias "TerminateProcess"
(ByVal hProcess As Long, ByVal uExitCode As Long) As Long

【说明】
结束一个进程

【返回值】
Long,非零表示成功,零表示失败。会设置GetLastError

【参数】
hProcess ------- Long,指定要中断的一个进程的句柄

uExitCode ------ Long,进程的一个退出代码
 
多人接受答案了。
 
顶部