The PDH_BROWSE_DLG_CONFIG structure is used by the PdhBrowseCounters 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;
FALSE: The returned counter path will not contain an instance number.
FALSE: Multiple selections are not permitted. Only one counter will be returned each time the Add button is clicked.
FALSE: The dialog box is not closed until the Close button is clicked. The Add button can be clicked multiple times.
FALSE: The machine name will prefix the counter path unless the user selects the Local Counters Only radio button.
FALSE: If All Instances has been selected, all the instances currently found for that object will be returned in a MULTI_SZ string.
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.
FALSE: Selects the initial counter and object using the default counter and object information returned by the machine.
If the buffer is too small to load the current selection, the browser will set this value to PDH_MORE_DATA. If the browser sets this member to ERROR_SUCCESS, then the szReturnPathBuffer member contains a valid counter path or counter path list.
If the callback function reallocates a new buffer, it should set this member to PDH_RETRY so that the browser will try to load the buffer with the selected paths and call the callback function again.
If some other error occurred, then the callback function should return the appropriate PDH error status value.
Each time the Add button is clicked, the szReturnPathBuffer buffer contains the selected counter and the pCallBack callback function is called. The callback function should call the PdhAddCounter function for each counter in the buffer.
Performance Data Helper Overview, Performance Data Structures, CounterPathCallback, PdhAddCounter, PdhBrowseCounters