NativeObjectSecurity.ExceptionFromErrorCode 委托

定义

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

public protected delegate Exception ^ NativeObjectSecurity::ExceptionFromErrorCode(int errorCode, System::String ^ name, SafeHandle ^ handle, System::Object ^ context);
protected internal delegate Exception NativeObjectSecurity.ExceptionFromErrorCode(int errorCode, string name, SafeHandle handle, object context);
protected internal delegate Exception? NativeObjectSecurity.ExceptionFromErrorCode(int errorCode, string? name, SafeHandle? handle, object? context);
Protected Friend Delegate Function NativeObjectSecurity.ExceptionFromErrorCode(errorCode As Integer, name As String, handle As SafeHandle, context As Object) As Exception 

参数

errorCode
Int32

数字错误代码。

name
String

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

handle
SafeHandle

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

context
Object

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

返回值

Exception

此委托创建的 Exception

扩展方法

GetMethodInfo(Delegate)

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

适用于