pdh.h header

This header is used by Performance Counters. For more information, see:

pdh.h contains the following programming interfaces:

Functions

 
PdhAddCounterA

Adds the specified counter to the query. (ANSI)
PdhAddCounterW

Adds the specified counter to the query. (Unicode)
PdhAddEnglishCounterA

Adds the specified language-neutral counter to the query. (ANSI)
PdhAddEnglishCounterW

Adds the specified language-neutral counter to the query. (Unicode)
PdhBindInputDataSourceA

Binds one or more binary log files together for reading log data. (ANSI)
PdhBindInputDataSourceW

Binds one or more binary log files together for reading log data. (Unicode)
PdhBrowseCountersA

Displays a Browse Counters dialog box that the user can use to select one or more counters that they want to add to the query. To use handles to data sources, use the PdhBrowseCountersH function. (ANSI)
PdhBrowseCountersHA

Displays a Browse Counters dialog box that the user can use to select one or more counters that they want to add to the query. This function is identical to the PdhBrowseCounters function, except that it supports the use of handles to data sources. (ANSI)
PdhBrowseCountersHW

Displays a Browse Counters dialog box that the user can use to select one or more counters that they want to add to the query. This function is identical to the PdhBrowseCounters function, except that it supports the use of handles to data sources. (Unicode)
PdhBrowseCountersW

Displays a Browse Counters dialog box that the user can use to select one or more counters that they want to add to the query. To use handles to data sources, use the PdhBrowseCountersH function. (Unicode)
PdhCalculateCounterFromRawValue

Calculates the displayable value of two raw counter values.
PdhCloseLog

Closes the specified log file.
PdhCloseQuery

Closes all counters contained in the specified query, closes all handles related to the query, and frees all memory associated with the query.
PdhCollectQueryData

Collects the current raw data value for all counters in the specified query and updates the status code of each counter. (PdhCollectQueryData)
PdhCollectQueryDataEx

Uses a separate thread to collect the current raw data value for all counters in the specified query. The function then signals the application-defined event and waits the specified time interval before returning.
PdhCollectQueryDataWithTime

Collects the current raw data value for all counters in the specified query and updates the status code of each counter. (PdhCollectQueryDataWithTime)
PdhComputeCounterStatistics

Computes statistics for a counter from an array of raw values.
PdhConnectMachineA

Connects to the specified computer. (ANSI)
PdhConnectMachineW

Connects to the specified computer. (Unicode)
PdhEnumLogSetNamesA

Enumerates the names of the log sets within the DSN. (ANSI)
PdhEnumLogSetNamesW

Enumerates the names of the log sets within the DSN. (Unicode)
PdhEnumMachinesA

Returns a list of the computer names associated with counters in a log file. (PdhEnumMachinesA)
PdhEnumMachinesHA

Returns a list of the computer names associated with counters in a log file. (PdhEnumMachinesHA)
PdhEnumMachinesHW

Returns a list of the computer names associated with counters in a log file. (PdhEnumMachinesHW)
PdhEnumMachinesW

Returns a list of the computer names associated with counters in a log file. (PdhEnumMachinesW)
PdhEnumObjectItemsA

Returns the specified object's counter and instance names that exist on the specified computer or in the specified log file. To use handles to data sources, use the PdhEnumObjectItemsH function. (ANSI)
PdhEnumObjectItemsHA

Returns the specified object's counter and instance names that exist on the specified computer or in the specified log file. This function is identical to the PdhEnumObjectItems function, except that it supports the use of handles to data sources. (ANSI)
PdhEnumObjectItemsHW

Returns the specified object's counter and instance names that exist on the specified computer or in the specified log file. This function is identical to the PdhEnumObjectItems function, except that it supports the use of handles to data sources. (Unicode)
PdhEnumObjectItemsW

Returns the specified object's counter and instance names that exist on the specified computer or in the specified log file. To use handles to data sources, use the PdhEnumObjectItemsH function. (Unicode)
PdhEnumObjectsA

Returns a list of objects available on the specified computer or in the specified log file. To use handles to data sources, use the PdhEnumObjectsH function. (ANSI)
PdhEnumObjectsHA

Returns a list of objects available on the specified computer or in the specified log file.This function is identical to PdhEnumObjects, except that it supports the use of handles to data sources. (ANSI)
PdhEnumObjectsHW

Returns a list of objects available on the specified computer or in the specified log file.This function is identical to PdhEnumObjects, except that it supports the use of handles to data sources. (Unicode)
PdhEnumObjectsW

Returns a list of objects available on the specified computer or in the specified log file. To use handles to data sources, use the PdhEnumObjectsH function. (Unicode)
PdhExpandCounterPathA

Examines the specified computer (or local computer if none is specified) for counters and instances of counters that match the wildcard strings in the counter path. (ANSI)
PdhExpandCounterPathW

Examines the specified computer (or local computer if none is specified) for counters and instances of counters that match the wildcard strings in the counter path. (Unicode)
PdhExpandWildCardPathA

Examines the specified computer or log file and returns those counter paths that match the given counter path which contains wildcard characters. To use handles to data sources, use the PdhExpandWildCardPathH function. (ANSI)
PdhExpandWildCardPathHA

Examines the specified computer or log file and returns those counter paths that match the given counter path which contains wildcard characters.This function is identical to the PdhExpandWildCardPath function, except that it supports the use of handles to data sources. (ANSI)
PdhExpandWildCardPathHW

Examines the specified computer or log file and returns those counter paths that match the given counter path which contains wildcard characters.This function is identical to the PdhExpandWildCardPath function, except that it supports the use of handles to data sources. (Unicode)
PdhExpandWildCardPathW

Examines the specified computer or log file and returns those counter paths that match the given counter path which contains wildcard characters. To use handles to data sources, use the PdhExpandWildCardPathH function. (Unicode)
PdhFormatFromRawValue

Computes a displayable value for the given raw counter values.
PdhGetCounterInfoA

Retrieves information about a counter, such as data size, counter type, path, and user-supplied data values. (ANSI)
PdhGetCounterInfoW

Retrieves information about a counter, such as data size, counter type, path, and user-supplied data values. (Unicode)
PdhGetCounterTimeBase

Returns the time base of the specified counter.
PdhGetDataSourceTimeRangeA

Determines the time range, number of entries and, if applicable, the size of the buffer containing the performance data from the specified input source. To use handles to data sources, use the PdhGetDataSourceTimeRangeH function. (ANSI)
PdhGetDataSourceTimeRangeH

Determines the time range, number of entries and, if applicable, the size of the buffer containing the performance data from the specified input source.This function is identical to the PdhGetDataSourceTimeRange function, except that it supports the use of handles to data sources.
PdhGetDataSourceTimeRangeW

Determines the time range, number of entries and, if applicable, the size of the buffer containing the performance data from the specified input source. To use handles to data sources, use the PdhGetDataSourceTimeRangeH function. (Unicode)
PdhGetDefaultPerfCounterA

Retrieves the name of the default counter for the specified object. This name can be used to set the initial counter selection in the Browse Counter dialog box. To use handles to data sources, use the PdhGetDefaultPerfCounterH function. (ANSI)
PdhGetDefaultPerfCounterHA

Retrieves the name of the default counter for the specified object. (ANSI)
PdhGetDefaultPerfCounterHW

Retrieves the name of the default counter for the specified object. (Unicode)
PdhGetDefaultPerfCounterW

Retrieves the name of the default counter for the specified object. This name can be used to set the initial counter selection in the Browse Counter dialog box. To use handles to data sources, use the PdhGetDefaultPerfCounterH function. (Unicode)
PdhGetDefaultPerfObjectA

Retrieves the name of the default object. This name can be used to set the initial object selection in the Browse Counter dialog box. To use handles to data sources, use the PdhGetDefaultPerfObjectH function. (ANSI)
PdhGetDefaultPerfObjectHA

Retrieves the name of the default object. (ANSI)
PdhGetDefaultPerfObjectHW

Retrieves the name of the default object. (Unicode)
PdhGetDefaultPerfObjectW

Retrieves the name of the default object. This name can be used to set the initial object selection in the Browse Counter dialog box. To use handles to data sources, use the PdhGetDefaultPerfObjectH function. (Unicode)
PdhGetDllVersion

Returns the version of the currently installed Pdh.dll file.
PdhGetFormattedCounterArrayA

Returns an array of formatted counter values. Use this function when you want to format the counter values of a counter that contains a wildcard character for the instance name. (ANSI)
PdhGetFormattedCounterArrayW

Returns an array of formatted counter values. Use this function when you want to format the counter values of a counter that contains a wildcard character for the instance name. (Unicode)
PdhGetFormattedCounterValue

Computes a displayable value for the specified counter.
PdhGetLogFileSize

Returns the size of the specified log file.
PdhGetRawCounterArrayA

Returns an array of raw values from the specified counter. Use this function when you want to retrieve the raw counter values of a counter that contains a wildcard character for the instance name. (ANSI)
PdhGetRawCounterArrayW

Returns an array of raw values from the specified counter. Use this function when you want to retrieve the raw counter values of a counter that contains a wildcard character for the instance name. (Unicode)
PdhGetRawCounterValue

Returns the current raw value of the counter.
PdhIsRealTimeQuery

Determines if the specified query is a real-time query.
PdhLookupPerfIndexByNameA

Returns the counter index corresponding to the specified counter name. (ANSI)
PdhLookupPerfIndexByNameW

Returns the counter index corresponding to the specified counter name. (Unicode)
PdhLookupPerfNameByIndexA

Returns the performance object name or counter name corresponding to the specified index. (ANSI)
PdhLookupPerfNameByIndexW

Returns the performance object name or counter name corresponding to the specified index. (Unicode)
PdhMakeCounterPathA

Creates a full counter path using the members specified in the PDH_COUNTER_PATH_ELEMENTS structure. (ANSI)
PdhMakeCounterPathW

Creates a full counter path using the members specified in the PDH_COUNTER_PATH_ELEMENTS structure. (Unicode)
PdhOpenLogA

Opens the specified log file for reading or writing. (ANSI)
PdhOpenLogW

Opens the specified log file for reading or writing. (Unicode)
PdhOpenQueryA

Creates a new query that is used to manage the collection of performance data. To use handles to data sources, use the PdhOpenQueryH function. (ANSI)
PdhOpenQueryH

Creates a new query that is used to manage the collection of performance data. This function is identical to the PdhOpenQuery function, except that it supports the use of handles to data sources.
PdhOpenQueryW

Creates a new query that is used to manage the collection of performance data. To use handles to data sources, use the PdhOpenQueryH function. (Unicode)
PdhParseCounterPathA

Parses the elements of the counter path and stores the results in the PDH_COUNTER_PATH_ELEMENTS structure. (ANSI)
PdhParseCounterPathW

Parses the elements of the counter path and stores the results in the PDH_COUNTER_PATH_ELEMENTS structure. (Unicode)
PdhParseInstanceNameA

Parses the elements of an instance string. (ANSI)
PdhParseInstanceNameW

Parses the elements of an instance string. (Unicode)
PdhReadRawLogRecord

Reads the information in the specified binary trace log file.
PdhRemoveCounter

Removes a counter from a query.
PdhSelectDataSourceA

Displays a dialog window that prompts the user to specify the source of the performance data. (ANSI)
PdhSelectDataSourceW

Displays a dialog window that prompts the user to specify the source of the performance data. (Unicode)
PdhSetCounterScaleFactor

Sets the scale factor that is applied to the calculated value of the specified counter when you request the formatted counter value. If the PDH_FMT_NOSCALE flag is set, then this scale factor is ignored.
PdhSetDefaultRealTimeDataSource

Specifies the source of the real-time data.
PdhSetQueryTimeRange

Limits the samples that you can read from a log file to those within the specified time range, inclusively.
PdhUpdateLogA

Collects counter data for the current query and writes the data to the log file. (ANSI)
PdhUpdateLogFileCatalog

Synchronizes the information in the log file catalog with the performance data in the log file.
PdhUpdateLogW

Collects counter data for the current query and writes the data to the log file. (Unicode)
PdhValidatePathA

Validates that the counter is present on the computer specified in the counter path. (ANSI)
PdhValidatePathExA

Validates that the specified counter is present on the computer or in the log file. (ANSI)
PdhValidatePathExW

Validates that the specified counter is present on the computer or in the log file. (Unicode)
PdhValidatePathW

Validates that the counter is present on the computer specified in the counter path. (Unicode)

Callback functions

 
CounterPathCallBack

Applications implement the CounterPathCallBack function to process the counter path strings returned by the Browse dialog box.

Structures

 
PDH_BROWSE_DLG_CONFIG_A

The PDH_BROWSE_DLG_CONFIG structure is used by the PdhBrowseCounters function to configure the Browse Performance Counters dialog box. (ANSI)
PDH_BROWSE_DLG_CONFIG_HA

The PDH_BROWSE_DLG_CONFIG_H structure is used by the PdhBrowseCountersH function to configure the Browse Performance Counters dialog box. (ANSI)
PDH_BROWSE_DLG_CONFIG_HW

The PDH_BROWSE_DLG_CONFIG_H structure is used by the PdhBrowseCountersH function to configure the Browse Performance Counters dialog box. (Unicode)
PDH_BROWSE_DLG_CONFIG_W

The PDH_BROWSE_DLG_CONFIG structure is used by the PdhBrowseCounters function to configure the Browse Performance Counters dialog box. (Unicode)
PDH_COUNTER_INFO_A

The PDH_COUNTER_INFO structure contains information describing the properties of a counter. This information also includes the counter path. (ANSI)
PDH_COUNTER_INFO_W

The PDH_COUNTER_INFO structure contains information describing the properties of a counter. This information also includes the counter path. (Unicode)
PDH_COUNTER_PATH_ELEMENTS_A

The PDH_COUNTER_PATH_ELEMENTS structure contains the components of a counter path. (ANSI)
PDH_COUNTER_PATH_ELEMENTS_W

The PDH_COUNTER_PATH_ELEMENTS structure contains the components of a counter path. (Unicode)
PDH_DATA_ITEM_PATH_ELEMENTS_A

The PDH_DATA_ITEM_PATH_ELEMENTS structure contains the path elements of a specific data item. (ANSI)
PDH_DATA_ITEM_PATH_ELEMENTS_W

The PDH_DATA_ITEM_PATH_ELEMENTS structure contains the path elements of a specific data item. (Unicode)
PDH_FMT_COUNTERVALUE

The PDH_FMT_COUNTERVALUE structure contains the computed value of the counter and its status.
PDH_FMT_COUNTERVALUE_ITEM_A

The PDH_FMT_COUNTERVALUE_ITEM structure contains the instance name and formatted value of a counter. (ANSI)
PDH_FMT_COUNTERVALUE_ITEM_W

The PDH_FMT_COUNTERVALUE_ITEM structure contains the instance name and formatted value of a counter. (Unicode)
PDH_RAW_COUNTER

The PDH_RAW_COUNTER structure returns the data as it was collected from the counter provider. No translation, formatting, or other interpretation is performed on the data.
PDH_RAW_COUNTER_ITEM_A

The PDH_RAW_COUNTER_ITEM structure contains the instance name and raw value of a counter. (ANSI)
PDH_RAW_COUNTER_ITEM_W

The PDH_RAW_COUNTER_ITEM structure contains the instance name and raw value of a counter. (Unicode)
PDH_RAW_LOG_RECORD

The PDH_RAW_LOG_RECORD structure contains information about a binary trace log file record.
PDH_STATISTICS

The PDH_STATISTICS structure contains the minimum, maximum, and mean values for an array of raw counters values.
PDH_TIME_INFO

The PDH_TIME_INFO structure contains information on time intervals as applied to the sampling of performance data.