The Visual Basic PdhRemoveCounter function removes the counter entry identified by the CounterHandle parameter.
PdhRemoveCounter(
ByVal CounterHandle as Long)
as Long
If the function succeeds, it returns a Long integer equal to ERROR_SUCCESS and the counter entry is deleted from the query.
If the function fails, the return value is a PDH error status defined in pdhdefs.txt. The following is a possible error value:
Value | Meaning |
---|---|
PDH_INVALID_HANDLE | The counter handle is not valid. |