Platform SDK: Performance Monitoring |
The PdhVbGetCounterPathElements function parses a fully qualified performance counter path string into its individual elements. Each of the string variables must be the same size (BufferSize) and dimensioned and initialized before it is used in this function.
PdhVbGetCounterPathElements( ByVal PathString as String, ByVal MachineName as String, ByVal ObjectName as String, ByVal InstanceName as String, ByVal ParentInstance as String, ByVal CounterName as String, ByVal BufferSize as Long ) as Long
If the function succeeds, it returns a Long integer equal to ERROR_SUCCESS.
If the function fails, the return value is a PDH error status defined in PDHDefs.txt. The following are possible error values.
Error value | Description |
---|---|
PDH_INVALID_ARGUMENT | One or more of the string buffers is not the correct size. |
PDH_INSUFFICIENT_BUFFER | One or more of the counter path elements is too large for the return buffer length. |
PDH_MEMORY_ALLOCATION_FAILURE | A temporary memory buffer could not be allocated. |
Windows NT/2000: Requires Windows NT 4.0 or later.
Library: Use Pdh.lib.