PdhExpandCounterPath 

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

   );

 

 

Parameters

szWildCardPath

The counter path to expand.

mszExpandedPathList

The buffer to receive the list of counter path names that match the wild card specification in the szWildCardPath buffer.

pcchPathListLength

The size of the mszExpandedPathList buffer, in characters, on entry and the size of the buffer used by the returned path strings on return.

 

Return Values

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a PDH error status defined in PDHMSG.H.

See Also

PdhMakeCounterPath