LoadPerfCounterTextStrings function

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

Syntax


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 client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Loadperf.h

Library

Loadperf.lib

DLL

Loadperf.dll

Unicode and ANSI names

LoadPerfCounterTextStringsW (Unicode) and LoadPerfCounterTextStringsA (ANSI)

See also

UnloadPerfCounterTextStrings

 

 

Show: