-1

I am very new to c++ . I am trying to get performance data from a computer system like cpu utilization , memory , battery etc.. For that i looked up a link where it is suggested to use PDH . Performance Data Helper in windows . But i cannot find any link to download or install pdh.h , pdh.lib or pdh.dll . Please hep me on this .

I am using visual studios 2017.

Here is code to get cpu percentage which i got from some Q&A in stack overflow

How to determine CPU and memory consumption from inside a process?

Aditya Nadig
  • 203
  • 3
  • 12
  • Should be part of the Windows SDK, so either you already have it installed thanks to Visual Studio or your development toolchain. If not, you'll have to add the tools you are using to the question so folks know what to suggest. – user4581301 Aug 14 '18 at 17:19

1 Answers1

2

I got it . You just have to include this line in visual c++.

#pragma comment(lib,"pdh.lib")
Aditya Nadig
  • 203
  • 3
  • 12