Platform SDK: Performance Monitoring |
To determine whether a counter is installed on a particular machine, pass the fully qualified counter path into a call to the PdhValidatePath function. If the counter is located on the specified machine, ERROR_SUCCESS will be returned. PdhValidatePath validates the entire path; therefore, if any object in the path doesn't exist, the return value of the function will identify it.
PdhValidatePath verifies the specified counter path in this order: machine, performance object, instance, and counter.