Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/249138

From BetaArchive Wiki

INFO: Controlling the Disabling of Performance Monitor Extensions


The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API)


IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

When developing and debugging your Performance Monitor extensible counter on Windows 2000, you may find that the system automatically disables it. This article provides information about how to configure the registry to disable this feature during the development of your extensible counter.


In versions of Windows NT prior to Windows 2000, one bad or defective performance DLL is able to render the performance monitoring features of the operating system inoperative. To maintain the integrity of the performance data and to improve the reliability of Windows 2000, the performance library disables any performance DLL that returns data in the incorrect format, that causes an unhandled program fault, or that takes too long to return the performance data (this is usually the cause of a library being disabled).

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

Q248993 PRB: Performance Object Is Not Displayed in Performance Monitor

This feature can affect the development of your performance extension DLL. The system will mark your extensible counter DLL as disabled because you are taking time to single-step through the Collect procedure in a debugger.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

To control this feature, set a REG_DWORD value named Configuration Flags in:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Perflib

If this value is not present, you can add it. The following lists the values and their meanings:

0x00 - Test for data buffer alignment errors.
0x01 - Do not test for data buffer alignment errors. Suppresses 1016 event.
0x02 - Do not disable DLLs when a critical error occurs but still post the events.
0x04 - Disable all perf counter function testing regardless of testing level. Critical errors will still disable DLLs.
0x08 - Enable the disabling of DLLs if timeouts are exceeded. Normally only other critical errors would disable DLLs.
0x10 - Enable the collection of statistics for each performance DLL. This is the default of Configuration Flags, if the value is not present.

These values can be combined by adding or using the bitwise OR operator. For example, a combination of 0x08 and 0x02 is 0x0A. However, some values may override other values. For example, if the value is set to 0x0A, a combination of 0x08 and 0x02, then 0x02 will overrule.

A specific example of using the Configuration Flags registry value when you have to single-step debug the performance extension is to set it to 0x02.

The change in this registry value takes effect after restarting the process that is collecting performance data, such as Performance Monitor.

In the earlier list of values, there are references to event log messages and the ExtCounterTestLevel registry value. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

Q226494 INFO: Events for Performance Monitor Extensions


For more information about implementing extensible counters, see the Platform SDK documentation in Base Services:

Performance Monitoring; Performance Monitoring; Using Performance Monitoring; Using Registry Interface; Adding Performance Counters.

Additional query words:

Keywords : kbAPI kbKernBase kbPerfMon kbOSWin32s kbDSupport kbGrpDSKernBase
Issue type : kbinfo
Technology : kbAudDeveloper kbWin32sSearch kbWin32API

Last Reviewed: March 2, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.