The PdhGetRawCounterValue function returns the current raw value of the counter.
PDH_STATUS PdhGetRawCounterValue(
IN HCOUNTER hCounter, // handle of the counter
IN LPDWORD lpdwType, // counter type
IN PPDH_RAW_COUNTER pValue // counter value
);
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:
The data for the counter is locked (protected) for the duration of the call to PdhGetRawCounterValue to prevent any changes during processing of the call.
Performance Data Helper Overview, Performance Data Functions, , PdhGetFormattedCounterValue, PdhCalculateCounterFromRawValue