Upravit

Sdílet prostřednictvím


PdhVbGetOneCounterPath function

The PdhVbGetOneCounterPath function displays a dialog box that lets the user browse the available performance counters 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.

Important

The function that this topic describes may be altered or unavailable in the future. Instead, Microsoft recommends that you use the functions described in Performance Counters Functions.

Function PdhVbGetOneCounterPath( _ ByVal PathString As String, _ ByVal PathLength As Long, _ ByVal DetailLevel As Long, _ ByVal CaptionString As String _ ) As Long

Parameters

PathString

Initialized string variable used to receive the counter path selected by the user.

PathLength

Length of the initialized PathString.

DetailLevel

Types of counters to be displayed in the dialog box. This parameter can be one of the following values.

Value Meaning
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_NOVICE
Only counters that the novice user is likely to understand.
PERF_DETAIL_WIZARD
All counters in the system.

CaptionString

String variable that contains the text that will be displayed in the caption bar of the dialog box.

Return value

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

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Library
Pdh.lib
DLL
Pdh.dll

See also

PdhVbCreateCounterPathList

PdhVbGetCounterPathElements

PdhVbGetCounterPathFromList