Performance Monitor Source Code

If you do plan to write your own performance monitor, you may want to know that the source code for the Windows NT Performance Monitor is included as sample code in the Windows NT SDK. If you have the Windows NT SDK, cut and paste to suit. This, of course, will void any warranties on the resulting code either expressed or implied or alluded to in private.

There are also examples in the Win32 API Reference. See Chapter 66, "Performance Monitoring," in Volume 2 of the Overviews. If you have the Windows NT SDK, you can cut and paste from these to your favorite editor. To do so, first type:

winhlp32 win32.hlp

Then choose Functions and Overviews: Performance Monitoring, and choose the Overview button.