I\'m working on a cross platform profiling suite, and would like to add information about the machine\'s CPU (architecture/clock speed/cores) and RAM(total) to the report of
I've written some code which uses the WMI service to get the Max Clock Speed, I know it's VB.net but it shows the idea:
'''
''' Use WMI to get the Clock Speed in Hz
'''
Public Function GetMaxClockSpeedInHz() As Double
Dim manObj = New ManagementObject("Win32_Processor.DeviceID='CPU0'")
manObj.Get()
GetMaxClockSpeedInHz = Convert.ToInt32(manObj.Properties("MaxClockSpeed").Value)
End Function
Win32_OperatingSystem reference : http://msdn.microsoft.com/en-us/library/Aa394239
WMI Reference : http://msdn.microsoft.com/en-us/library/aa394572(v=VS.85).aspx