0

Does anyone know what API (ideally C++) Microsoft is using to generate the "Speed" value in the Windows 10 Task Manager Performance tab? (See highlight in attached image.)

I am aware of some other paths to get similar information (WMI, RDTSC, read MSR via kernel driver, per core loop timing of add_ps instruction via HWLOC, etc.) but all seem to have various drawbacks (or are plain incorrect).

And I am simply wondering if whatever API (if any) Microsoft is using to generate that specific display has been documented anywhere.

Thank you for taking the time to read this question and for any advice regarding the topic.

Text

I appreciate the feedback on the topic.

However, regarding the flagged as duplicate / closing: I understand that similar question have been asked. And over the last couple weeks I have actively tried many of the suggested approaches. (Including the great information provided at How can I programmatically find the CPU frequency with C and others)

Still, none of the provided answers in the supposed duplicate seem to apply to this question.

  • For example, the path via reading the value from the registry appears to just give the base speed of the CPU (listed as 2.50 GHz on this system).

  • Other answers given in the supposed duplicate (WMI, RDTSC, QueryPerformanceFrequency) do not lead to valid values when compared to what the OS displays in the attached screenshot.

  • Third party applications like CPUz (which was another pointer given in the supposed duplicate) are not an option for my use case (looking for an API).

  • Another option that is also frequently mentioned is a custom kernel driver to read the MSR registers. (Another path I pursued to verify the results of other approaches. But that unfortunately is not a viable path due to the driver signing requirements outside of debug / test systems.)

If Microsoft does not provide an API to get the information they display on the shown dialog then that is fine (maybe because it is a protected / undocumented API).

But I was hoping to get a definitive answer to that particular question.

taithwork
  • 23
  • 3
  • Just FYI, `PrtScn` or even `Alt + PrtScn` (capture specific window) is preferable to mobile phone screenshots :^) – alteredinstance Feb 05 '20 at 19:41
  • @alteredinstance: True :) ... but posting that screen capture to Imgur from the system it is taken on is not always an option. I see your point though. – taithwork Feb 05 '20 at 21:54
  • This question is way to off-topic on SO – Vega Feb 06 '20 at 05:57
  • If the other suggestions are similar or "not quite", perhaps you should post your code or whatever your attempt is and go from there? You'll garner a better response when you show code on here; although I still think your original question is perfectly valid, despite being a duplicate (which I do agree with until you show us more of your approach) – alteredinstance Feb 06 '20 at 14:51
  • @Vega: Fair enough ... it might be too unspecific in terms of asking "if a thing exists" VS "how a thing works" - with the later one being a little more in line with existing Stackoverflow content. – taithwork Feb 06 '20 at 19:30

0 Answers0