PdhValidatePath 

The PdhValidatePath function validates that the specified counter is present on the machine specified in the counter path.

PDH_STATUS PdhValidatePath(

    IN LPCTSTR szFullCounterPath

// counter path to validate

   );

 

 

Parameters

szFullCounterPath

The counter path to validate.

 

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. The following are possible error values:

PDH_CSTATUS_NO_INSTANCE

The specified instance of the performance object was not found.

PDH_CSTATUS_NO_COUNTER

The specified counter was not found in the performance object.

PDH_CSTATUS_NO_OBJECT

The specified performance object was not found on the machine.

PDH_CSTATUS_NO_MACHINE

The specified machine could not be found or connected to.

PDH_CSTATUS_BAD_COUNTERNAME

The counter path string could not be parsed.

PDH_MEMORY_ALLOCATION_FAILURE

The function is unable to allocate a required temporary buffer.

 

See Also

PdhMakeCounterPath