Performance Counters Functi ...


LoadPerfCounterTextStrings Function

Loads onto the computer the performance objects and counters defined in the specified initialization file.

Syntax

C++
DWORD LoadPerfCounterTextStrings(
  __in  LPCTSTR commandLine,
  __in  BOOL bQuietModeArg
);

Parameters

commandLine [in]

Null-terminated string that consists of one or more arbitrary letters, a space, and then the name of the initialization (.ini) file. The name can include the path to the initialization file.

The function uses only the initialization file; the first argument is discarded. For example, to load an initialization file called "myfile.ini", the commandLine string could be "xx myfile.ini". The letters before the space (here "xx") are discarded, and the second part, following the space, is interpreted as the initialization file specification.

bQuietModeArg [in]

Set to TRUE to prevent the function from displaying the output from the Lodctr tool; otherwise, FALSE. This parameter has meaning only if the application is run from a command prompt.

Return Value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is one of the system error codes.

Remarks

This function provides an API to the functionality provided by the Lodctr tool. For information on Lodctr, see Adding Counter Names and Descriptions to the Registry.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderLoadperf.h
LibraryLoadperf.lib
DLLLoadperf.dll
Unicode and ANSI namesLoadPerfCounterTextStringsW (Unicode) and LoadPerfCounterTextStringsA (ANSI)

See Also

UnloadPerfCounterTextStrings

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags :


Page view tracker