Platform SDK: Performance Monitoring

PdhSetDefaultRealTimeDataSource

The PdhSetDefaultRealTimeDataSource function specifies the source of the real-time data to be collected.

PDH_FUNCTION PdhSetDefaultRealTimeDataSource(
  DWORD dwDataSourceId            
);

Parameters

dwDataSourceId
[in] The source of the performance data. This parameter can be one of the following values.
Value Meaning
DATA_SOURCE_REGISTRY The data source is the registry interface.
DATA_SOURCE_WBEM The data source is a real-time source.

Return Values

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a PDH error status defined in PDHMsg.h. The following are possible error values.

Error value Description
PDH_INVALID_ARGUMENT An invalid argument was specified.

Remarks

The term real-time as used in the description of this function does not imply the standard meaning of the term real-time. Instead, it describes the collection of performance data from a source providing current information (for example, the registry or a WMI provider) rather than from a log file.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Pdh.h.
  Library: Use Pdh.lib.

See Also

PdhSelectDataSource