// wdm.h
typedef struct _PCW_COUNTER_DESCRIPTOR {
USHORT Id;
USHORT StructIndex;
USHORT Offset;
USHORT Size;
} PCW_COUNTER_DESCRIPTOR, *PPCW_COUNTER_DESCRIPTOR;
View the official Windows Driver Kit DDI referenceNo description available.
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.
IdA 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.
StructIndexA 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.
OffsetA 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.
SizeA 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).
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.
_PCW_REGISTRATION_INFORMATION structure