110,535
社区成员
发帖
与我相关
我的任务
分享
Process.GetProcess();
返回的数组,遍历每一个进程的PID,找到你要的相关的进程模块名称,然后再遍历一遍找到同名(但是PID不同)的其它进程。
Mutex mutex = new Mutex(true, "myteststring", out onlyInstance);
if (!onlyInstance)
{
mutex.Close();
}