NativeAction<T1, T2, T3>

Namespace: SharpPluginLoader.Core

Represents a function pointer to a native function with the given return type and arguments.

public struct NativeAction<T1, T2, T3>

Type Parameters

T1

T2

T3

Inheritance ObjectValueTypeNativeAction<T1, T2, T3>

Properties

NativePointer

Gets the native function pointer.

public nint NativePointer { get; }

Property Value

IntPtr

Invoke

Invokes the function pointer.

public  Invoke { get; }

Property Value


InvokeUnsafe

Invokes the function pointer without transitioning the Garbage Collector. Use this for very short functions.

public  InvokeUnsafe { get; }

Property Value


Remarks:

See SuppressGCTransitionAttribute

Constructors

NativeAction(IntPtr)

NativeAction(nint funcPtr)

Parameters

funcPtr IntPtr

NativeAction(Int64)

NativeAction(long funcPtr)

Parameters

funcPtr Int64