Platform SDK: Performance Monitoring |
The PDH_FMT_COUNTERVALUE structure is the most commonly used method of reading the data from within an application. The data type of the data returned (member of the union that will have meaningful data) is specified by the caller when requesting the data. The CStatus member provides the status of the counter. Check this member before using the data in a calculation or display. The counter, and therefore the data, could be invalid.
typedef struct _PDH_FMT_COUNTERVALUE { DWORD CStatus; union { LONG longValue; double doubleValue; LONGLONG largeValue; LPCSTR AnsiStringValue; LPCWSTR WideStringValue; }; } PDH_FMT_COUNTERVALUE, *PPDH_FMT_COUNTERVALUE;
Windows NT/2000: Requires Windows NT 4.0 or later.
Header: Declared in Pdh.h.
PdhCalculateCounterFromRawValue, PdhGetFormattedCounterValue