如何杀死 Windows Mobile 中的进程? [英] How to kill a process in Windows Mobile?

查看:37
本文介绍了如何杀死 Windows Mobile 中的进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows Forms 应用程序中,我终止了这样的进程:

In a Windows Forms application I kill a process like this:

    Process[] ps = Process.GetProcessesByName("DataWedge");
    foreach (Process p in ps)
        p.Kill();

如何在 Windows Mobile 操作系统中执行此操作?

How can I do it in the Windows Mobile operating system?

(此示例不适用于 Windows Mobile.)

(This sample doesn't work on Windows Mobile.)

推荐答案

您需要枚举设备上运行的进程以获取其进程 ID.获得 processId 后,您可以执行以下操作:

You need to enumerate the Processes running on the device in order to get it's process ID. Once you've got the processId you can just do:

Process process Process.GetProcessById(processId);
process.Kill();

这是一个 文章 处理枚举进程,它还包括一个终止示例.

Here's an article that deals with enumerating the processes, it also includes a kill example as well.

这篇关于如何杀死 Windows Mobile 中的进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆