文件名称:TerminateProcess
介绍说明--下载内容均来自于网络,请自行研究使用
program TerminateProcess {$APPTYPE CONSOLE} uses SysUtils, Windows var ProcessHwnd, WindowHwnd: THandle ProcessID: DWORD begin //得到记事本的主窗口句柄 WindowHwnd := FindWindow( Notepad , nil) if not isWindow(WindowHwnd) then ExitProcess(0) //得到记事本的进程标识 GetWindowThreadProcessId(WindowHwnd, ProcessID) if ProcessID = 0 then ExitProcess(0) //根据进程标识打开进程句柄 ProcessHwnd := OpenProcess(PROCESS_ALL_ACCESS, false, ProcessID) if ProcessHwnd = 0 then ExitProcess(0) //中止指定句柄的进程 Windows.TerminateProcess(ProcessHwnd, 0) end.-program (TerminateProcess $ APPTYPE CONSOLE) uses SysUtils, Windows var ProcessHwnd, WindowHwnd : THandle ProcessID : DWORD begin / / notebook to be the main window handle WindowHwnd : = FindWindow (Notepad, nil) if not isWindow (WindowHwnd) then ExitProcess (0) / / notebook to be in the process logo GetWindowThreadProcessId (WindowHwnd, ProcessID) if ProcessID = 0 then ExitProcess (0) / / identification process under the process opened handle ProcessHwnd : = OpenProcess (PROCESS_ALL_ACCESS, false, ProcessID) if ProcessHwnd = 0 then ExitProcess (0) / / designated handle suspend the process Windows.TerminateProcess (ProcessHwnd, 0) end.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 470284terminateprocess.rar 列表 TerminateProcess TerminateProcess\TerminateProcess.dof TerminateProcess\TerminateProcess.cfg TerminateProcess\TerminateProcess.dpr TerminateProcess\TerminateProcess.exe