Platform SDK: Performance Monitoring

Obtaining Counter Path Elements from a Counter Path

PdhParseCounterPath performs the converse operation of PdhMakeCounterPath. While PdhMakeCounterPath creates a string containing a fully qualified counter path from the counter path element names specified in a PDH_COUNTER_PATH_ELEMENTS structure, PdhParseCounterPath parses a string containing a fully qualified counter path and extracts the performance object names into a PDH_COUNTER_PATH_ELEMENTS structure.

You can perform a similar process for counter instances when the instance name is complex and has a parent instance and instance index. Given a string containing information about an instance, the PdhParseInstanceName function will extract and return details about the instance name, its parent counter, and its index number. An example of when PdhParseInstanceName would be used is when the index number of a particular instance of a process—for example, an Internet Explorer root process—must be obtained.