ServiceController的方法:
得到本地计算机上的设备驱动器服务:
public static ServiceController[] GetDevices()
public static ServiceController[] GetDevices(string machineName)
得到一台计算机上的非设备驱动器服务:
public static ServiceController[] GetServices()
public static ServiceController[] GetServices(string machineName)
得到本地计算机上的设备驱动器服务:
public static ServiceController[] GetDevices()
public static ServiceController[] GetDevices(string machineName)
得到一台计算机上的非设备驱动器服务:
public static ServiceController[] GetServices()
public static ServiceController[] GetServices(string machineName)
解决方案 »
- ComboBox 如何做到区分大小写的补全
- xeon的CPU运行winform程序为什么这么慢。
- 求一个正则表达式
- 小问题
- SQL语句有问题...高手请帮忙!!!
- use reader read string from oracle but '\0' appear to replace char in string!! why???
- 请问在PDA上如何用程序打开蓝牙端口
- 这是怎么回事啊?
- 界面~~~
- 我没有用.net开发过项目,所学杂乱无章,希望能得到一个简单的,体现编程思想的例子
- Excel Application 問題
- [散分以希望小偷不要再多] 年终小偷太多了---------- -_-b 阿
t.CategoryName ="Process";
t.CounterName ="Private Bytes";foreach (Process thisproc in Process.GetProcesses())
{
t.InstanceName=thisproc.ProcessName; //进程名称
if(t.NextValue()>=99999) //使用CPU大于设定值{
thisproc.Close(); //关闭
}
}
{
Cosole.WriteLine(thisproc.ProcessName); //进程名称
}
thisproc.WorkingSet
直接获得CPU的使用率用当前进程的CPU使用量来除以CPU总值