Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,651 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
i want to monitor the windows system cpu usage using c/c++ code
which api can i use and how to get the cpu usage?
One of the ways is with PDH
If I test the old MS KB287158 sample,
by replacing PdhAddCounter by PdhAddEnglishCounter (my OS is french) (+ changing strings to Unicode),
I get about the same result as Task Manager