Are you looking for managed or native wrappers? The link you posted is managed, but your question is native (C ++). In a managed world, everything is pretty simple and straightforward to publish counters using PerformanceCounter and its relatives http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecounter.aspx . For moderate volumes, they can also be used to read counters, for large volumes, but you should use PDH.DLL, since the overhead of managed counters reading one counter at a time will be overwhelming in my experience. Personally, I developed XSLT transformations to generate all prfmon counters in my applications, which I wrote about here: http://rusanu.com/2009/04/11/using-xslt-to-generate-performance-counters-code/ , and I have more recent stuff to blog down the pipe. If you have a question about an unmanaged API, I donβt have a pointer, but personally I would go the way of using XSLT again to generate all my perfmon code, as it repeats a lot.
Remus Rusanu
source share