Platform SDK: Performance Monitoring

Adding Counters to a Query

After you create a query, call the PdhAddCounter function to add a counter to the query. Call PdhAddCounter for each counter to be added to the query. You can use one of the following methods to provide PdhAddCounter with a fully qualified counter string.

If you're returning performance data from a log file, you can also define a time range within which the query collects performance data. For more information on how to set and get query-time ranges, refer to the following sections.