The PdhExpandCounterPath function examines the specified machine (or local machine if none is specified) for counters and instances of counters that match the wild card strings in the counter path. The counter path format is assumed to be:
\\machine\object(parent/instance#index)\countername
and the parent, instance, index, and countername elements may contain either a valid name or a wild card character.
PDH_STATUS PdhExpandCounterPath(
IN LPCTSTR szWildCardPath, // counter path to expand
IN PPTSTR mszExpandedPathList, // names that match
IN LPDWORD pcchPathListLength // size of buffer
);
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is a PDH error status defined in pdhmsg.h.
Performance Data Helper Overview, Performance Data Functions, , PdhMakeCounterPath