大网数据广告活动
性能与资源

Creating the Applications Performance Key

· 52CE 我爱测

An application that supports performance counters must have a Performance key under the Services key. The following example shows the values that you must include for this key.

An application that supports performance counters must have a Performance key under the Services key. The following example shows the values that you must include for this key.

HKEY_LOCAL_MACHINE
   \SYSTEM
      \CurrentControlSet
         \Services
            \application-name
               \Performance
                  Library = Name of your performance DLL
                  Open = Name of your Open function in your DLL
                  Collect = Name of your Collect function in your DLL
                  Close = Name of your Close function in your DLL

The Library value provides the name of the performance DLL, and the Open, Collect, and Close values provide the names of the functions exported from the performance DLL. The data type of these values is REG_SZ. When a consumer requests performance data, the system uses these values to determine which performance DLLs to load and which DLL functions to call.

The Library value can contain the DLL name or a full path to the DLL. If you use the REG_EXPAND_SZ data type for Library, you can specify environment variables in your path.

The application's service key must exist before you can run lodctr to load your counter names and help strings.

For additional registry values that you can create, such as specifying time out values for the OpenPerformanceData and CollectPerformanceData functions, see Creating Other Registry Entries.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 07/14/2025
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。