Platform SDK: Performance Monitoring |
The PdhSetCounterScaleFactor function sets the scale factor that is applied to the calculated value of the specified counter when you request the formatted counter value. If the PDH_FMT_NOSCALE flag is set, then this scale factor is ignored.
PDH_STATUS PdhSetCounterScaleFactor( HCOUNTER hCounter, LONG lFactor );
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is an error status defined in PDHMsg.h. The following are possible error values.
Error value | Description |
---|---|
PDH_INVALID_ARGUMENT | The scale value is out of range. |
PDH_INVALID_HANDLE | The counter handle is not valid. |
Windows NT/2000: Requires Windows NT 4.0 or later.
Header: Declared in Pdh.h.
Library: Use Pdh.lib.
PdhCalculateCounterFromRawValue, PdhComputeCounterStatistics, PdhGetFormattedCounterValue