Open a log file for reading by calling PdhOpenQuery. PdhOpenQuery can only be used to open a log file for a read operation.
Refer to Creating a Query for more information on how to use PdhOpenQuery.