NativeObjectSecurity.ExceptionFromErrorCode 委托

定义

为集成器提供一种将数字错误代码映射到它们创建的特定异常的方式。Provides a way for integrators to map numeric error codes to specific exceptions that they create.

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 Friend Delegate Function NativeObjectSecurity.ExceptionFromErrorCode(errorCode As Integer, name As String, handle As SafeHandle, context As Object) As Exception 

参数

errorCode
Int32

数字错误代码。The numeric error code.

name
String

NativeObjectSecurity 对象所关联的可保护对象的名称。The name of the securable object with which the NativeObjectSecurity object is associated.

handle
SafeHandle

NativeObjectSecurity 对象所关联的可保护对象的句柄。The handle of the securable object with which the NativeObjectSecurity object is associated.

context
Object

包含有关异常的源或目标的上下文信息的对象。An object that contains contextual information about the source or destination of the exception.

返回值

Exception

此委托创建的 ExceptionThe Exception this delegate creates.

继承
NativeObjectSecurity.ExceptionFromErrorCode

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于