Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Development
Diagnostics
 LoadPerfCounterTextStrings function
LoadPerfCounterTextStrings function

Applies to: desktop apps only

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 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Loadperf.h

Library

Loadperf.lib

DLL

Loadperf.dll

Unicode and ANSI names

LoadPerfCounterTextStringsW (Unicode) and LoadPerfCounterTextStringsA (ANSI)

See also

UnloadPerfCounterTextStrings

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
LodCtr.exe functionality available on Vista and later?      ColbyRingeisen   |   Edit   |   Show History
LodCtr.exe was enhanced beginning with Vista to allow loading performance counter sets by specifying an XML manifest file (instead of an INI file). Is this supported by the LoadPerfCounterTextStrings function? If so, please update the documentation. If not, Microsoft needs to provide a function that can load a counter set via XML manifest file as wrapping the LodCtr.exe command line and interpreting the return from my application code is not preferred.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker