Platform SDK: Performance Monitoring

PdhVbGetOneCounterPath

The PdhVbGetOneCounterPath function displays a dialog box that lets the user browse the available performance counters on a Windows NT/Windows 2000 system and select one counter. The counter selected is returned in the PathString variable. The PathString variable must be dimensioned and initialized before this function is called, and the dimensioned size must be indicated by the PathLength variable.

PdhVbGetOneCounterPath(
  ByVal PathString as String,   
  ByVal PathLength as Long,    
  ByVal DetailLevel as Long,   
  ByVal CaptionString as String   
) as Long

Parameters

PathString
The initialized string variable used to receive the counter path selected by the user.
PathLength
The length of the initialized PathString.
DetailLevel
One of the following values defined in PDHDefs.txt. The selected value indicates the types of counters to be displayed in the dialog box:
Value Counters displayed
PERF_DETAIL_NOVICE Only counters that the novice user is likely to understand.
PERF_DETAIL_ADVANCED Counters that the advanced user is likely to understand, in addition to the novice-user counters.
PERF_DETAIL_EXPERT Counters that the expert user and software developer is likely to understand, in addition to the counters for the novice and advanced users.
PERF_DETAIL_WIZARD All counters in the system.

CaptionString
A string variable that contains the text that will be displayed in the caption bar of the dialog box.

Return Values

The function returns the number of characters written to the PathString buffer.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Library: Use Pdh.lib.