PCW_COUNTER_DESCRIPTOR structure (wdm.h)

The PCW_COUNTER_DESCRIPTOR structure is used to provide information about a counter value during counterset registration. Most developers do not need to access this structure directly because it is automatically managed by the counterset registration code generated by the CTRPP tool.

Syntax

typedef struct _PCW_COUNTER_DESCRIPTOR {
  USHORT Id;
  USHORT StructIndex;
  USHORT Offset;
  USHORT Size;
} PCW_COUNTER_DESCRIPTOR, *PPCW_COUNTER_DESCRIPTOR;

Members

Id

A numeric value that specifies the ID of the counter described by this structure. This should match the value provided in the id field of a counter element in the provider's counterset manifest.

StructIndex

A numeric value that specifies an index into an array of PCW_DATA structures. In subsequent calls to PcwCreateInstance or PcwAddInstance, the data block described by PcwData[PcwCounterDescriptor->StructIndex] will be used as the source of data for the counter with ID PcwCounterDescriptor->Id.

Offset

A numeric value that specifies an offset (in bytes) relative to the data block indicated by the StructIndex field. In subsequent calls to PcwCreateInstance or PcwAddInstance, the address PcwData[PcwCounterDescriptor->StructIndex].Data + PcwCounterDescriptor->Offset will be used as the start of the value for the counter with ID PcwCounterDescriptor->Id.

Size

A numeric value that specifies the size, in bytes, of the value for the counter with ID PcwCounterDescriptor->Id. The Size field should be set to 4 (for a UINT32 counter value) or 8 (for a UINT64 counter value).

Remarks

Most developers do not need to use this structure directly. The CTRPP tool generates registration code that initializes PCW_COUNTER_DESCRIPTOR structures based on the content of the provider manifest.

An array of PCW_COUNTER_DESCRIPTOR structures is provided during counterset registration (via the PCW_REGISTRATION_INFORMATION structure passed to PcwRegister). The information from the array is recorded and will be used by PcwCreateInstance or PcwAddInstance to extract counter values from the data blocks described by a PCW_DATA array.

Requirements

Requirement Value
Minimum supported client Available in Windows 7 and later versions of Windows.
Header wdm.h (include Wdm.h, Ntddk.h)

See also

_PCW_REGISTRATION_INFORMATION structure

_PCW_DATA structure

CTRPP

counter Complex Type