Platform SDK: Performance Monitoring |
The PdhRemoveCounter function removes a counter from a query.
[C++] PDH_STATUS PdhRemoveCounter( HCOUNTER hCounter ); [Visual Basic] PdhRemoveCounter( ByVal CounterHandle as Long ) as Long
If the function succeeds, it returns ERROR_SUCCESS and removes the specified counter from its query. Otherwise, the function returns a PDH error value.
The following is the possible PDH error value.
Value | Meaning |
---|---|
PDH_INVALID_HANDLE | The counter handle is not valid. |
[C++] PDH error values are defined in PDHMsg.h.
[Visual Basic] PDH error values are defined in PDHDefs.txt.
After you remove a counter, any references to it using a handle passed in hCounter will be invalid and will return an error.
Windows NT/2000: Requires Windows NT 4.0 or later.
Header: Declared in Pdh.h (C/C++).
Library: Use Pdh.lib.