Delphi 以记事本程序为例监视进程运行状况.rar

时间:2022-07-30 11:12:39
【文件属性】:
文件名称:Delphi 以记事本程序为例监视进程运行状况.rar
文件大小:6KB
文件格式:RAR
更新时间:2022-07-30 11:12:39
Delphi源码-系统相关 Delphi 监视进程运行状况,示例以创建记事本进程向大家展示,创建进程、终止进程的情况,通过监视器可知道进程的状态。在判断进程状态时,以下代码起到了关键作用:   dwExitCode := 0;   fprocessExit := GetExitCodeProcess    (PProcInfo.hProcess, dwExitCode);   if (fprocessExit and (dwExitCode <> STILL_ACTIVE)) then   begin    Memo1.Lines.Add('NotePad进程终止');    CloseHandle(PProcInfo.hThread);    CloseHandle(PProcInfo.hProcess);    AllRunProcess;   end;
【文件预览】:
srcfans.com
----监视进程运行()
--------Project2.res(876B)
--------Unit1.ddp(51B)
--------Unit1.dcu(5KB)
--------Unit1.dfm(1KB)
--------Project2.dpr(190B)
--------Project2.dof(1KB)
--------Unit1.pas(2KB)

网友评论