PDH_BROWSE_DLG_CONFIG 

The PDH_BROWSE_DLG_CONFIG structure is used by the PdhBrowseCountersY59M13 function to configure the PDH Browse Counters dialog box.

typedef struct _BrowseDlgConfig { 

    // Configuration flags

    DWORD   bIncludeInstanceIndex:1,

            bSingleCounterPerAdd:1,

            bSingleCounterPerDialog:1,

            bLocalCountersOnly:1,

            bWildCardInstances:1,

            bHideDetailBox:1,

            bInitializePath:1,

            bReserved:25;

 

    HWND                hWndOwner;

    LPTSTR              szReserved;

    LPTSTR              szReturnPathBuffer;

    DWORD               cchReturnPathLength;

    CounterPathCallBack pCallBack;

    DWORD               dwCallBackArg;

    PDH_STATUS          CallBackStatus;

    DWORD               dwDefaultDetailLevel;

    LPTSTR              szDialogBoxCaption;

} PDH_BROWSE_DLG_CONFIG, *PPDH_BROWSE_DLG_CONFIG;

 

Members

Configuration Flags

The initial DWORD of the PDH_BROWSE_DLG_CONFIG structure contains the following configuration flag fields. The default value for each field is FALSE.

bIncludeInstanceIndex

TRUE: The returned counter path will include the instance index for the instance.

FALSE: The returned counter path will not contain an instance number.

bSingleCounterPerAdd

TRUE: Multiple selections are not permitted. Only one counter will be returned each time the ADD button is clicked.

FALSE: Multiple and wild card selections are permitted. Selected counters are returned as a multi-SZ string each time the ADD button is clicked.

bSingleCounterPerDialog

TRUE: The dialog box is closed after the ADD button is clicked the first time.

FALSE: The dialog box is not closed until the CLOSE button is clicked. The ADD button can be clicked, and counters can be added, multiple times.

bLocalCountersOnly

TRUE: The machine name will not prefix the counter path in the returned string.

FALSE: The machine name will prefix the counter path unless the user selects the Local Counters Only radio button.

bWildCardInstances

TRUE: If wild card instances (for example, ALL) are selected, then the returned counter path will include the wild-card syntax (for example,  * ) for the instance field.

FALSE: If All Instances has been selected, all the instances currently found for that object will be returned in a multi-SZ string.

bHideDetailBox

TRUE: Removes the Detail Level combo box from the dialog box so the user cannot change the detail level of the counters displayed in the dialog box. The detail level will be fixed to the value of the dwDefaultDetailLevel member.

FALSE: Displays the Detail Level combo box in the dialog box, allowing the user to change the detail level of the counters displayed.

Note that the counters displayed will be those whose detail level is less than or equal to the current detail level selection. Selecting a detail level of Wizard will display all counters and objects.

bInitializePath

TRUE: Selects the counter and object based on the first counter path contained in the szReturnPathBuffer member when the dialog box is first displayed, instead of using the default counter and object specified by the machine.

FALSE: Selects the initial counter and object using the default counter and object information returned by the machine.

 

hWndOwner

The handle of the calling function s window.

szReserved

Reserved. Must be NULL.

szReturnPathBuffer

The buffer, allocated by the caller, that is used to initialize the first selection in the list boxes (bInitializePath == TRUE) and to return the selected counters to the calling function or the callback procedure.

cchReturnPathLength

The current maximum size, in characters, of the buffer referenced by the szReturnPathBuffer member.

pCallBack

The address of the callback function used to update application buffers and controls when a multiple-selection dialog box is configured.

dwCallBackArg

User-defined argument that is passed as the only argument to the callback function when it is called by the dialog box.

CallBackStatus

Status of the dialog box prior to calling the callback function.

dwDefaultDetailLevel

The default detail level to show on startup in the Detail Level combo box. If the Detail Level combo box is not shown, this is the detail level to use in filtering the displayed performance counters and objects.

szDialogBoxCaption

The optional caption to be displayed in the caption bar of the PDH Browse Counters dialog box. If this member is NULL, the caption will be Browse Performance Counters.

 

See Also

CounterPathCallback, PdhBrowseCounters