//Size of the structure, including the appended strings, in bytes.
DwLengthuint32
//Counter type. For a list of counter types, see the Counter Types section of the <a "href=http://go.microsoft.com/fwlink/p/?linkid=84422">Windows Server 2003 Deployment Kit</a>.
//The counter type constants are defined in Winperf.h.
DwTypeuint32
//Counter version information. Not used.
CVersionuint32
//Counter status that indicates if the counter value is valid. For a list of possible values,
//Scale factor to use when computing the displayable value of the counter. The scale factor is a power of ten.
//The valid range of this parameter is PDH_MIN_SCALE (–7) (the returned value is the actual value times 10–⁷) to
//PDH_MAX_SCALE (+7) (the returned value is the actual value times 10⁺⁷). A value of zero will set the scale to one, so that the actual value is returned
LScaleint32
//Default scale factor as suggested by the counter's provider.
LDefaultScaleint32
//The value passed in the dwUserData parameter when calling PdhAddCounter.
DwUserData*uint32
//The value passed in the dwUserData parameter when calling PdhOpenQuery.
DwQueryUserData*uint32
//Null-terminated string that specifies the full counter path. The string follows this structure in memory.
SzFullPath*uint16// pointer to a string
//Null-terminated string that contains the name of the computer specified in the counter path. Is NULL, if the path does not specify a computer.
//The string follows this structure in memory.
SzMachineName*uint16// pointer to a string
//Null-terminated string that contains the name of the performance object specified in the counter path. The string follows this structure in memory.
SzObjectName*uint16// pointer to a string
//Null-terminated string that contains the name of the object instance specified in the counter path. Is NULL, if the path does not specify an instance.
//The string follows this structure in memory.
SzInstanceName*uint16// pointer to a string
//Null-terminated string that contains the name of the parent instance specified in the counter path. Is NULL, if the path does not specify a parent instance.
//The string follows this structure in memory.
SzParentInstance*uint16// pointer to a string
//Instance index specified in the counter path. Is 0, if the path does not specify an instance index.
DwInstanceIndexuint32// pointer to a string
//Null-terminated string that contains the counter name. The string follows this structure in memory.
SzCounterName*uint16// pointer to a string
//padding
Padding[4]byte
//Help text that describes the counter. Is NULL if the source is a log file.
SzExplainText*uint16// pointer to a string
//Start of the string data that is appended to the structure.
// The PDH_RAW_COUNTER structure returns the data as it was collected from the counter provider. No translation, formatting, or other interpretation is performed on the data
typePDH_RAW_COUNTERstruct{
// 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 https://docs.microsoft.com/windows/desktop/PerfCtrs/checking-pdh-interface-return-values
CStatusuint32
// Local time for when the data was collected
TimeStampFILETIME
// First raw counter value.
FirstValueint64
// Second raw counter value. Rate counters require two values in order to compute a displayable value.
SecondValueint64
// If the counter type contains the PERF_MULTI_COUNTER flag, this member contains the additional counter data used in the calculation.
// For example, the PERF_100NSEC_MULTI_TIMER counter type contains the PERF_MULTI_COUNTER flag.
MultiCountuint32
}
typePDH_RAW_COUNTER_ITEMstruct{
// Pointer to a null-terminated string that specifies the instance name of the counter. The string is appended to the end of this structure.
SzName*uint16
//A PDH_RAW_COUNTER structure that contains the raw counter value of the instance