简体   繁体   中英

Having a path to an .exe how can I find out if it is running?

我想知道是否以及如何可以找出来自C:\\Windows\\System32 Calc.exe是否正在运行(在XP及以上版本,不使用像WMIC这样的外部应用程序)(类似于System.Diagnostics及其Process.GetProcesses() 为C#开发人员提供了但是对于原生的winapi )?

You just have to enumerate the processes and search for a match.

The APIs to use are Process32First and Process32Next . Sample code here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM