LoadPerfCounterTextStringsA function

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

Syntax

LOADPERF_FUNCTION LoadPerfCounterTextStringsA(
  LPSTR lpCommandLine,
  BOOL  bQuietModeArg
);

Parameters

lpCommandLine

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

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 client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header loadperf.h
Library Loadperf.lib
DLL Loadperf.dll

See also

UnloadPerfCounterTextStrings