vb.net - Get current clock speed with ManagementObjectSearcher -


i'd current clock speed. search results suggest wmi. problem is, doesn't work. example, overclocked cpu test (increased 200 mhz). cpu-z reported correctly, 4.2 ghz. wmi incorrectly reported @ 4.0 ghz (the stock max clock speed).

i've noticed system properties doesn't report clock speed right. assume pulling data using wmi. understand cpus don't run @ highest clock speed. in circumstance, running @ highest clock speed (according cpu-z).

the reason want figure out compare current clock speed, , max clock speed (to determine if cpu overclocked in application).

here's example of code.

imports system.management public class form1  private sub button1_click(sender system.object, e system.eventargs) handles button1.click     dim cpuspeed string = string.empty     dim wmiobj managementobjectsearcher = new managementobjectsearcher("root\cimv2", "select * win32_processor")     each element managementobject in wmiobj.get()         cpuspeed = element.getpropertyvalue("currentclockspeed").tostring     next     msgbox("your current cpu speed " & cpuspeed, msgboxstyle.information, "wmi test") end sub end class 

the result stock clock speed. won't tell me current.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -