4 simple problems
-
1. How to get actual usage of processor? 2.How to get actual usage of RAM ? 3.How to get list of physical drives ? 4.How to get information about network card? I will be very greatfull if you could give me answer to any of that questions, thank you very much in advance! :)
-
1. How to get actual usage of processor? 2.How to get actual usage of RAM ? 3.How to get list of physical drives ? 4.How to get information about network card? I will be very greatfull if you could give me answer to any of that questions, thank you very much in advance! :)
WMI is what you need for most of this. To get the drives is easy, there's an API that returns them all, in System.IO, from memory.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
WMI is what you need for most of this. To get the drives is easy, there's an API that returns them all, in System.IO, from memory.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
hi there. to use WMI, visit "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi\_reference.asp" here is an example to collection physical drive info. namespace: System.Management ConnectionOptions conOpt = new ConnectionOptions(); conOpt.Username="administrator"; conOpt.Password="password"; ManagementScope localScope = new ManagementScope("\\pcgnadeem",conOpt);//computer name ManagementObjectSearcher searcher = new ManagementObjectSearcher(); //searcher.Scope=localScope;//required only for remote computers ObjectQuery query = new ObjectQuery("Select Name from Win32_LogicalDisk Where DriveType=3"); searcher.Query=query; ManagementObjectCollection ResultsCollection = searcher.Get(); foreach(ManagementObject obj in ResultsCollection){ MessageBox.Show(obj["Name"].ToString()); }