Delphi检查进程是否在运行
来源:互联网 发布:java纸牌游戏源代码 编辑:程序博客网 时间:2024/04/29 19:15
From: http://www.cnblogs.com/taobataoma/archive/2007/08/20/862668.html
{ Check if a process from the task list is active. } uses TlHelp32; function processExists(exeFileName: string): Boolean; var ContinueLoop: BOOL; FSnapshotHandle: THandle; FProcessEntry32: TProcessEntry32; begin FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); FProcessEntry32.dwSize := SizeOf(FProcessEntry32); ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32); Result := False; while Integer(ContinueLoop) <> 0 do begin if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) = UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) = UpperCase(ExeFileName))) then begin Result := True; end; ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32); end; CloseHandle(FSnapshotHandle); end; procedure TForm1.Button1Click(Sender: TObject); begin if processExists('notepad.exe') then ShowMessage('process is running') else ShowMessage('process not running'); end;
- Delphi检查进程是否在运行
- 检查进程是否在运行
- linux检查进程是否正在正常运行
- delphi 查看windows后台进程是否运行
- 检查是否本程序已经在运行
- android 检查服务是否在运行
- 在service中检查Activity是否运行。
- 检查Android进程当前是否正在后台运行
- 检查进程是否存在
- 程序运行初期检查是否已经有一个自身的进程在运行,保证一台PC机器只运行一个程序
- vb检测进程是否在运行
- 如何查看进程是否在运行
- 判断进程是否在WOW64上运行
- 检测指定进程是否在运行
- linux 查看某个进程是否在运行
- Delphi 检查文件是否存在
- 检查程序是否运行在VMWare虚拟机里
- c#检查启动的程序是否已经在运行
- Delphi防止同时出现多个应用程序实例--CreateMutex
- C#上传文件到网站指定目录
- java中的io系统总结
- Linux上安装GCC编译器过程
- C#一个渐变并且消失的窗体
- Delphi检查进程是否在运行
- Air Michael Jordan
- [转载]hibernate从3.1升级到3.2
- SCU BSS讨论帖子
- 如何得到一个数据表的所有数字型字段???
- 《时代》杂志公布2008年度最佳网站50强名单
- 创建EJB3.0 Project时EJB Tools-Error问题解决办法
- moss 文档浏览次数统计
- 在windows下面关闭subprocess打开的子进程