Platform SDK: Performance Monitoring |
The PdhSetDefaultRealTimeDataSource function specifies the source of the real-time data to be collected.
PDH_FUNCTION PdhSetDefaultRealTimeDataSource( DWORD dwDataSourceId );
Value | Meaning |
---|---|
DATA_SOURCE_REGISTRY | The data source is the registry interface. |
DATA_SOURCE_WBEM | The data source is a real-time source. |
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. |
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.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Pdh.h.
Library: Use Pdh.lib.