how to kill process in Windows-CE?

前端 未结 5 1985
野的像风
野的像风 2020-12-21 02:51

How can I kill process Windows\\MyProcc.exe from my terminal (Windows-CE 5.0) using C# code?

5条回答
  •  Happy的楠姐
    2020-12-21 02:57

    First find the Process by giving the running exe's name and kill it. Use the System.Diagnostics namespace.

    Process[] Prs = Process.GetProcessesById(RunninExe);
    if (Prs.Length > 0)
    {
          foreach (Process Prss in Prs)
          {
              Prss.Kill();
          }
    }
    

提交回复
热议问题