本文介绍了如何在没有PerformanceCounter的情况下获得可用内存和CPU使用率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Windows XP,该Windows XP不提供类别处理器或内存,并且无法将其显示给他们(不允许编辑注册表或更改系统文件)

I have Windows XP which do not provide the Categories Processor or Memory, and I cannot bring it to show them(I'm not allowed to edit the registry nor to change System Files)

是否有任何方法可以在不使用PerformanceCounter的情况下获取实际的CPU使用率和可用内存?

Is there any way to get the actual CPU usage and Free Memory without using PerformanceCounter?

我在Windows XP SP2上使用.NET 3.5C#

I'm using .NET 3.5 and C# on Windows XP SP2

推荐答案

您可以使用本机win32 API调用吗?如果是这样,那么他们会在您之后提供信息.

Would you be able to use native win32 API calls? If so then they would provide the information your after.

请参阅以下文章: CodeProject:使用C#调用API函数

这篇关于如何在没有PerformanceCounter的情况下获得可用内存和CPU使用率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 05:51