PERF_COUNTER_HEADER structure (perflib.h)

Contains information about the PERF_COUNTER_HEADER block that contains the structure. A PERF_COUNTER_HEADER block provides error information and data for performance counter queries, and consists of a PERF_COUNTER_HEADER structure followed by additional performance counter data.

Syntax

typedef struct _PERF_COUNTER_HEADER {
  ULONG               dwStatus;
  PerfCounterDataType dwType;
  ULONG               dwSize;
  ULONG               Reserved;
} PERF_COUNTER_HEADER, *PPERF_COUNTER_HEADER;

Members

dwStatus

An error code that indicates whether the operation to query the performance succeeded or failed.

dwType

The type of performance counter information that the PERF_COUNTER_HEADER block provides.

Value Meaning
PERF_ERROR_RETURN
An error that was the result of a performance counter query. The performance library cannot get valid counter data back from provider. No additional data follows the PERF_COUNTER_HEADER structure. The dwStatus member of the structure contains the error code.
PERF_SINGLE_COUNTER
The result of a single-counter, single-instance query; for example, "\Processor(_Total)\% Processor Time". The additional data consists of a PERF_COUNTER_DATA block.
PERF_MULTIPLE_COUNTERS
The result of a multi-counter, single-instance query; for example, "\Processor(_Total)\*". The additional data consists of a PERF_MULTI_COUNTERS block followed by PERF_COUNTER_DATA blocks.
PERF_MULTIPLE_INSTANCES
The result of a single-counter, multi-instance query; for example, "\Processor(*)\% Processor Time". The additional data consists of a PERF_MULTI_INSTANCES block.
PERF_COUNTERSET
The result of a multi-counter, multi-instance query; for example, "\Processor(*)\*". The additional data consists of a PERF_MULTI_COUNTERS block followed by a PERF_MULTI_INSTANCES block.

dwSize

The total size of the PERF_COUNTER_HEADER block, which equals the sum of the size of the PERF_COUNTER_HEADER structure and the size of the additional data.

Reserved

Reserved.

Remarks

The PerfQueryCounterData function returns a PERF_DATA_HEADER block that contains a sequence of PERF_COUNTER_HEADER blocks.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1607 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Header perflib.h

See also

PERF_COUNTER_DATA

PERF_MULTI_COUNTERS

PERF_MULTI_INSTANCES

PerfCounterDataType