LoadPerfCounterTextStringsW function (loadperf.h)
Loads onto the computer the performance objects and counters defined in the specified initialization file.
Syntax
LOADPERF_FUNCTION LoadPerfCounterTextStringsW(
[in] LPWSTR lpCommandLine,
[in] BOOL bQuietModeArg
);
Parameters
[in] 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.
[in] 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.
Note
The loadperf.h header defines LoadPerfCounterTextStrings as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
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 |