Edit

Share via


Performance Counters Data Types

Performance Data Helper (PDH) types

Consumers that use the Performance Data Helper (PDH) functions use the following types:

Data type Description
PDH_HQUERY Handle to a query. The PdhOpenQuery function returns this handle. Close the handle using PdhCloseQuery.
PDH_HCOUNTER Handle to a counter. The PdhAddCounter function returns this handle. Close the handle using PdhRemoveCounter or by closing the handle to the query that contains the counter. Do not call PdhRemoveCounter on a counter if the corresponding query has already been closed. PDH maintains the linkage between counters and queries and will automatically close counter handles when the corresponding query handle is closed.
PDH_HLOG Handle to a log file. The PdhOpenLog and PdhBindInputDataSource functions return this handle. Close the handle using PdhCloseLog.
PDH_STATUS PDH status value. All PDH functions return a value of type PDH_STATUS. If the function succeeds, the return value is ERROR_SUCCESS. Otherwise, the function returns a system error code or a PDH error code.