Platform SDK: Performance Monitoring |
The PdhGetRawCounterArray function returns an array of raw values from the specified counter.
PDH_STATUS PdhGetRawCounterArray( HCOUNTER hCounter, LPDWORD lpdwBufferSize, LPDWORD lpdwItemCount, PPDH_RAW_COUNTER_ITEM ItemBuffer );
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_MORE_DATA | The buffer was not large enough to contain the counter data. |
PDH_INVALID_HANDLE | The counter handle is not valid. |
The data for the counter is locked for the duration of the call to PdhGetRawCounterArray to prevent any changes during processing of the call.
The value of hCounter can be obtained by a call to PdhAddCounter, with a wildcard specified for the instance name.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Pdh.h.
Library: Use Pdh.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
PdhGetFormattedCounterValue, PdhGetFormattedCounterArray, PdhCalculateCounterFromRawValue, PDH_RAW_COUNTER_ITEM, PdhAddCounter