NativeObjectSecurity.ExceptionFromErrorCode 委托

定义

为集成器提供一种将数字错误代码映射到它们创建的特定异常的方式。

C#
protected internal delegate Exception? NativeObjectSecurity.ExceptionFromErrorCode(int errorCode, string? name, SafeHandle? handle, object? context);
C#
protected internal delegate Exception NativeObjectSecurity.ExceptionFromErrorCode(int errorCode, string name, SafeHandle handle, object context);

参数

errorCode
Int32

数字错误代码。

name
String

NativeObjectSecurity 对象所关联的可保护对象的名称。

handle
SafeHandle

NativeObjectSecurity 对象所关联的可保护对象的句柄。

context
Object

包含有关异常的源或目标的上下文信息的对象。

返回值

此委托创建的 Exception

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。

适用于

产品 版本
.NET Core 1.0, Core 1.1, 6 (package-provided), 6, 7 (package-provided), 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5