Browsing Performance Counters

You can call the PdhBrowseCounters function to display the following dialog box, which lets you browse and select performance counters.

You control the configuration of the browse dialog box by setting members of the PDH_BROWSE_DLG_CONFIG structure that you pass to PdhBrowseCounters. The szReturnPathBuffer member contains a pointer to a buffer you allocate. The cchReturnPathLength member contains the size of the buffer you allocated. This buffer provides a communication link between your application and the browse dialog box.