Performance Monitor (PDH) again

When you’ve added a counter to a query whose instance does not exist yet, then you get an PDH_STATUS_NO_INSTANCE error (or something like it). But you still get that same error after the instance has been created; even if you remove the counter from the query and add it again. The only remedy seems to be to call PdhEnumObjects with the bRefresh flag set to TRUE, and the re-adding the counter, but that is very slow…

Leave a Reply

Your email address will not be published. Required fields are marked *