大网数据广告活动
磁盘与文件系统

Extensible Storage Engine Errors

· 52CE 我爱测

Learn more about: Extensible Storage Engine Errors

Applies to: Windows | Windows Server

Extensible Storage Engine Errors

All possible errors returned by the Extensible Storage Engine (ESE) API are defined by the JET_ERR data type. For a list of the error flags that are defined for this API, see Extensible Storage Engine Error Codes.

Throughout the ESE API documentation, only the most important errors are documented. These errors typically represent API usage errors or very important error conditions. Be aware that any of these ESE APIs can also return other errors that are not documented for each API. In these cases, the caller should simply handle the error as they would any other error that is returned by the API. The specific error value may then be used for diagnostic purposes such as tracing.

In general, a value that is greater than zero should be interpreted as a warning, a value of zero should be interpreted as success, and a value that is less than zero should be interpreted as an error. No other patterns in these values (for example, ranges of values) should be relied upon by an application.

When ESE encounters some of the more serious errors, it creates an event log entry that contains details about the errors. The level of logging can be controlled by Event Log Parameters.

Some applications require the ability to return JET_ERRs as HRESULTs. The following C++ example shows how to make that conversion:

    #ifndef FACILITY_JET_ERR
    #define FACILITY_JET_ERR 0xE5E
    #endif
    #ifndef HRESULT_FROM_JET_ERR
    #define HRESULT_FROM_JET_ERR( __err )
    (
      ( __err ) == JET_errSuccess ?
      S_OK :
      (
        ( __err ) == JET_errOutOfMemory ?
        E_OUTOFMEMORY :
        MAKE_HRESULT
        (
          (
            ( __err ) < 0 ?
            SEVERITY_ERROR :
            SEVERITY_SUCCESS
          ),
          FACILITY_JET_ERR,
          (
            ( __err ) < 0 ?
            -( __err ) :
            ( __err )
          )
          & 0xFFFF
        )
      )
    )
    
    #endif

For information about configuring system parameters for error handling, see Error Handling Parameters.

See Also

Error Handling Parameters

Extensible Storage Engine Error Codes

JET_ERR

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 04/11/2016
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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