Platform SDK: Performance Monitoring

Creating a Query

To create a new query, call the PdhOpenQuery function. The function returns a handle to the query to be used in other PDH function calls. You can create more than one query to be used in your program by calling PdhOpenQuery for each query.

When reading performance data from a real-time source, specify NULL as the first parameter of the PdhOpenQuery call. When reading performance data from a log file, specify the name of the log file as the first parameter.