PDH_COUNTER_INFO 

The PDH_COUNTER_INFO structure contains information describing the properties of a counter. This information also includes the counter path. The format of this buffer is to have the structure described below followed by a variable-length buffer containing the string information referenced by the string pointers in the structure (szFullPath, szMachineName, szObjectName, szInstanceName, szParentInstance, szCounterName, and szExplainText).

typedef struct _PDH_COUNTER_INFO { 

    DWORD   dwLength;

    DWORD   dwType;

    DWORD   CVersion;

    DWORD   CStatus;

    LONG    lScale;

    LONG    lDefaultScale;

    DWORD   dwUserData;

    DWORD   dwQueryUserData;

    LPTSTR  szFullPath;

    union  

        PDH_COUNTER_PATH_ELEMENTS CounterPath;

        struct { 

            LPTSTR   szMachineName;

            LPTSTR   szObjectName;

            LPTSTR   szInstanceName;

            LPTSTR   szParentInstance;

            DWORD    dwInstanceIndex;

            LPTSTR   szCounterName;

        };

    };

    LPTSTR  szExplainText;

    DWORD   DataBuffer[1];

} PDH_COUNTER_INFO, *PPDH_COUNTER_INFO;

 

Members

dwLength

The length of the structure, including strings.

dwType

The counter type.

CVersion

Counter version information.

CStatus

The current counter status. See Counter Status versus Function Status.

lScale

The current scale factor.

lDefaultScale

The recommended scale factor.

dwUserData

The value of the counter s User Data field.

dwQueryUserData

The value of the User Data field for the query to which the counter belongs.

szFullPath

The full counter path.

CounterPath

See PDH_COUNTER_PATH_ELEMENTSC.AJHD.

szExplainText

The explain text for this counter.

DataBuffer[1]

The first byte of string data appended to the structure.

 

See Also

PDH_COUNTER_PATH_ELEMENTS, PdhGetCounterInfo