'How to get the data from performance counters for a specific process from my c++ project in windows?

I want to get the number of L3 cache misses caused by a specific process in windows. I know about perfmon and xperf, but I want to do this using my c++ project. I am new in this topics, is there any source that can help me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source