首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > program (TerminateProcess $ APPTYPE CONSOLE) uses SysUtils, Windows var ProcessH...

program (TerminateProcess $ APPTYPE CONSOLE) uses SysUtils, Windows var ProcessH...

  • 资源大小:21.20 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: Process-Thread delphi

资 源 简 介

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, fals

文 件 列 表

TerminateProcess
TerminateProcess.dof
TerminateProcess.cfg
TerminateProcess.dpr
TerminateProcess.exe
VIP VIP
0.166861s