PdhSelectDataSourceA function (pdh.h)
Displays a dialog window that prompts the user to specify the source of the performance data.
PDH_FUNCTION PdhSelectDataSourceA( [in] HWND hWndOwner, [in] DWORD dwFlags, [out] LPSTR szDataSource, [in, out] LPDWORD pcchBufferLength );
Owner of the dialog window. This can be NULL if there is no owner (the desktop becomes the owner).
Dialog boxes that will be displayed to prompt for the data source. This parameter can be one of the following values.
Caller-allocated buffer that receives a null-terminated string that contains the name of a log file that the user selected. The log file name is truncated to the size of the buffer if the buffer is too small.
If the user selected a real time source, the buffer is empty.
[in, out] pcchBufferLength
Maximum size of the szDataSource buffer, in TCHARs.
If the function succeeds, it returns ERROR_SUCCESS.
||The length of the buffer passed in the pcchBufferLength is not equal to the actual length of the szDataSource buffer.|
||A zero-length buffer was passed in the szDataSource parameter.|
The pdh.h header defines PdhSelectDataSource as an alias which 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 not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|