Process.GetProcesses返回所有登录用户的进程? [英] Process.GetProcesses returns processes of all logged on users?

查看:820
本文介绍了Process.GetProcesses返回所有登录用户的进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在允许多个用户同时登录到计算机的Windows环境中,当我们调用 Process.GetProcesses()时,它是否返回记录的进程对正在进行此调用的用户或返回所有登录用户的进程。我看看MSDN页面,但couldnt找到这个信息。

In a windows environment where multiple users are allowed to log on to a machine simultaneously, when we call Process.GetProcesses() , does it return the processes of the logged on user who is making this call or does it return processes of all the logged on users. I had a look at the MSDN page but couldnt find this information.

推荐答案

此函数返回本地计算机上运行的所有进程资源。

MSDN(我也在我的电脑上检查它。)

This function returns all the process resources running on the local computer.
You can see it on MSDN (I also check it on my computer..)


返回值

Return Value

Type: System.Diagnostics.Process []

一个类型为Process的数组,表示在本地计算机上运行的所有进程资源。

如果您有兴趣获取特定用户的流程,请查看以下代码 - http://www.codeproject.com/Articles/ 14828 / How-To-Get-Process-Owner-ID-and-Current-User-SID

If you are interesting in getting processes of specific user look at the following code - http://www.codeproject.com/Articles/14828/How-To-Get-Process-Owner-ID-and-Current-User-SID

这篇关于Process.GetProcesses返回所有登录用户的进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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