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

Error Handling in the DLL

· 52CE 我爱测

Use event logging to record errors that occur in the performance DLL.

Use event logging to record errors that occur in the performance DLL. Logging error events aids in troubleshooting applications that provide performance data during development and after installation. You should limit the amount of error logging that occurs in the CollectPerformanceData function because data collection can be frequent.

The system logs the following errors to the event log if there are problems with the OpenPerformanceData function. If one of the following errors occurs, the system does not call the performance DLL again. Instead, the DLL is unloaded.

  • PERFLIB_OPEN_PROC_NOT_FOUND—Logged when the procedure name defined in the registry could not be found in the DLL as an exported function. This usually occurs when the DLL or the service is not installed correctly or the function name has been renamed without updating the installation procedure.
  • PERFLIB_OPEN_PROC_FAILURE—Logged when the open procedure returned an error status other than ERROR_SUCCESS. Should this happen, the DLL should have also entered an event log entry describing the conditions that caused the failure.
  • PERFLIB_OPEN_PROC_EXCEPTION—Logged when the open procedure encounters an unhandled exception. This is usually due to an unexpected error condition encountered by the open procedure.

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)

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

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