Platform SDK: Performance Monitoring

PDH_FMT_COUNTERVALUE

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;

Members

CStatus
The status of last collection operation for this counter. For more information, see Checking PDH Interface Return Values.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Header: Declared in Pdh.h.

See Also

PdhCalculateCounterFromRawValue, PdhGetFormattedCounterValue