संपादित करें

इसके माध्यम से साझा किया गया


ObjectiveCMarshal.UnhandledExceptionPropagationHandler Delegate

Definition

Handler for unhandled Exceptions crossing the managed -> native boundary (that is, Reverse P/Invoke).

public: delegate delegate* unmanaged<IntPtr , void> ^ ObjectiveCMarshal::UnhandledExceptionPropagationHandler(Exception ^ exception, RuntimeMethodHandle lastMethod, [Runtime::InteropServices::Out] IntPtr % context);
public delegate delegate* unmanaged<IntPtr, void> ObjectiveCMarshal.UnhandledExceptionPropagationHandler(Exception exception, RuntimeMethodHandle lastMethod, out IntPtr context);
type ObjectiveCMarshal.UnhandledExceptionPropagationHandler = delegate of Exception * RuntimeMethodHandle * nativeint -> delegate* unmanaged<nativeint, unit>
Public Delegate Function ObjectiveCMarshal.UnhandledExceptionPropagationHandler(exception As Exception, lastMethod As RuntimeMethodHandle, ByRef context As IntPtr) As delegate* unmanaged< As IntPtr, Void> 

Parameters

exception
Exception

Unhandled exception.

lastMethod
RuntimeMethodHandle

Last managed method.

context
IntPtr

nativeint

Context provided to the returned function pointer.

Return Value

delegate* unmanaged<IntPtr, Void>

delegate* unmanaged<nativeint, Void>

Exception propagation callback.

Remarks

If the handler is able to propagate the managed Exception properly to the native environment an unmanaged callback can be returned, otherwise null. The RuntimeMethodHandle is to the last managed method that was executed prior to leaving the runtime. Along with the returned callback, the handler can return a context that will be passed to the callback during dispatch.

The returned handler will be passed the context when called and it is the responsibility of the callback to manage. The handler must not return and is expected to propagate the exception (for example, throw a native exception) into the native environment or fail fast.

Extension Methods

GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to