Platform SDK: Performance Monitoring |
The PdhGetCounterTimeBase function returns the time base of the specified counter.
PDH_STATUS PdhGetCounterTimeBase( HCOUNTER hCounter, LONGLONG *pTimeBase );
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.
Error value | Description |
---|---|
PDH_INVALID_ARGUMENT | An argument is not correct or is incorrectly formatted. |
PDH_INVALID_HANDLE | The counter handle is not valid. |
This function can be used to get the time base for a subsequent call to the PdhFormatFromRawValue function.
If a non-time-based counter is specified, PDH_INVALID_ARGUMENT will be returned.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Pdh.h.
Library: Use Pdh.lib.