PdhSetDefaultRealTimeDataSource
TOC
Collapse the table of content
Expand the table of content

PdhSetDefaultRealTimeDataSource function

Specifies the source of the real-time data.

Syntax


PDH_STATUS PdhSetDefaultRealTimeDataSource(
  _In_ DWORD dwDataSourceId
);

Parameters

dwDataSourceId [in]

Source of the performance data. This parameter can be one of the following values.

ValueMeaning
DATA_SOURCE_REGISTRY

The data source is the registry interface. This is the default.

DATA_SOURCE_WBEM

The data source is a WMI provider.

 

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a system error code or a PDH error code. The following is a possible value.

Return codeDescription
PDH_INVALID_ARGUMENT

The parameter is not valid.

 

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.

If you want to query real-time data from WMI, you must call PdhSetDefaultRealTimeDataSource to set the default real-time data source. You must call this function before calling any other PDH API function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Pdh.h

Library

Pdh.lib

DLL

Pdh.dll

See also

PdhSelectDataSource

 

 

Show:
© 2016 Microsoft