PdhBindInputDataSourceA function (pdh.h)

Binds one or more binary log files together for reading log data.

Syntax

PDH_FUNCTION PdhBindInputDataSourceA(
  [out] PDH_HLOG *phDataSource,
  [in]  LPCSTR   LogFileNameList
);

Parameters

[out] phDataSource

Handle to the bound data sources.

[in] LogFileNameList

Null-terminated string that contains one or more binary log files to bind together. Terminate each log file name with a null-terminator character and the list with one additional null-terminator character. The log file names can contain absolute or relative paths. You cannot specify more than 32 log files.

If NULL, the source is a real-time data source.

Return value

Returns ERROR_SUCCESS if the function succeeds.

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

Remarks

This function is used with the PDH functions that require a handle to a data source. For a list of these functions, see See Also.

You cannot specify more than one comma-delimited (CSV) or tab-delimited (TSV) file. The list can contain only one type of file—you cannot combine multiple file types.

To close the bound log files, call the PdhCloseLog function using the log handle.

Note

The pdh.h header defines PdhBindInputDataSource as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header pdh.h
Library Pdh.lib
DLL Pdh.dll

See also

PdhBrowseCountersH

PdhEnumMachinesH

PdhEnumObjectItemsH

PdhEnumObjectsH

PdhExpandWildCardPathH

PdhGetDataSourceTimeRangeH

PdhGetDefaultPerfCounterH

PdhGetDefaultPerfObjectH

PdhOpenQueryH