PDH_FMT_COUNTERVALUE structure (pdh.h)

The PDH_FMT_COUNTERVALUE structure contains the computed value of the counter and its status.

Syntax

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

Counter status that indicates if the counter value is valid. Check this member before using the data in a calculation or displaying its value. For a list of possible values, see Checking PDH Interface Return Values.

longValue

The computed counter value as a LONG.

doubleValue

The computed counter value as a DOUBLE.

largeValue

The computed counter value as a LONGLONG.

AnsiStringValue

The computed counter value as a LPCSTR. Not supported.

WideStringValue

The computed counter value as a LPCWSTR. Not supported.

Remarks

You specify the data type of the computed counter value when you call PdhGetFormattedCounterValue or PdhCalculateCounterFromRawValue to compute the counter's value.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header pdh.h

See also

PdhCalculateCounterFromRawValue

PdhGetFormattedCounterValue