A setup program can also set up the counters for performance monitoring, which define the data for monitoring server application performance. These counters are used by the Windows NT Performance Monitor when it is launched.
You can install performance monitoring in two steps:
To install performance monitoring
Call the HrInstallServicePerfMon function of EXCHINST.C. This function creates a performance monitor object (or class) in the Windows NT Registry, and creates keys for that object. It also creates a single registry instance of this class.
Call the FLoadCounters function, which loads performance counters into the newly created Windows NT Registry entry. Later, when you run the Windows NT Performance Monitor, the object and instance (with default counters) are available. You should call FLoadCounters only for the first instance of the service being monitored. The FLoadCounters function is defined in EDKSETUP.H.