I wanted to write a program like DUMeter except with source code that I could tweak.
(Note: this won't work if you are running Windows 98.)
I used the code from Matt Pietrek's May '98 "Under the Hood" as a starting point. He writes about the exciting details of the performance data helper DLL ("pdh.dll"). The link to his code on MSDN is broken, but you can find the original code on this page, or more specifically here.
Here's the source so you can play with it too: