BUG: LoadPerfCounterTextStrings Fails with Error 87 (188769)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000

This article was previously published under Q188769

SYMPTOMS

The LoadPerfCounterTextStrings Win32 API fails with return code 87 (ERROR_INVALID_PARAMETER) when you use it as prescribed in the Platform SDK documentation.

CAUSE

The first parameter needs more information in addition to the .ini filename to qualify parameter validation.

RESOLUTION

To work around this problem, pre-pend characters and a space to the filename specification for the first parameter. Then LoadPerfCounterTextStrings will qualify the first parameter, but ignore the pre-pended characters.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The documentation states that the first parameter, lpCommandLine, is the name of your initialization file. Although this is a reasonable design it does not work this way.

LoadPerfCounterTextStrings was implemented in conjunction with the Lodctr.exe utility. The main routine of the utility simply takes the command-line information and passes it to LoadPerfCounterTextStrings, which is typically the name of the executable (a space character), and the name of a file. It does not matter what the pre-pended word in the string is. For example:
     lRet = LoadPerfCounterTextStrings("x myperf.ini", FALSE);
				
The filename myperf.ini specifies a hypothetical performance counter .ini file.

REFERENCES

For more information about LoadPerfCounterTextStrings see:

Platform SDK: Windows Base Services; Windows NT Features; Performance Data Helper; Performance Data Helper; Adding Performance Counters

Modification Type:MajorLast Reviewed:3/15/2004
Keywords:kbAPI kbbug kberrmsg kbKernBase kbpending kbPerfMon KB188769