Platform SDK: Performance Monitoring

Enumerating Performance Objects

PdhEnumObjects returns a list of all of the performance objects that exist on the specified machine. PdhEnumObjectItems returns a list of all of the counters and instances contained within a specified performance object. You can also use PdhEnumObjectItems to identify the objects and counters that provided the performance data contained in a log file. Keep in mind that repeated calls to PdhEnumObjectItems will return the same list of counters and instances unless you call PdhEnumObjects to refresh the list of performance objects first. Refer to the reference page for PdhEnumObjectItems for more information.

An example of when you would use PdhEnumObjects and PdhEnumObjectItems is when you want to read a log file with unknown counter data.

Refer to Enumerating Process Objects for a code example that uses PdhEnumObjects and PdhEnumObjectItems.