Table of Contents

Struct NativeFunction<T1, TRet>

Namespace
SharpPluginLoader.Core
Assembly
SharpPluginLoader.Core.dll

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

public readonly struct NativeFunction<T1, TRet>

Type Parameters

T1
TRet
Inherited Members

Constructors

NativeFunction(long)

public NativeFunction(long funcPtr)

Parameters

funcPtr long

NativeFunction(nint)

public NativeFunction(nint funcPtr)

Parameters

funcPtr nint

Properties

Invoke

Invokes the function pointer.

public delegate* unmanaged<T1, TRet> Invoke { get; }

Property Value

delegate* unmanaged<T1, TRet>

InvokeUnsafe

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

public delegate* unmanaged[SuppressGCTransition]<T1, TRet> InvokeUnsafe { get; }

Property Value

delegate* unmanaged[SuppressGCTransition]<T1, TRet>

Remarks

NativePointer

Gets the native function pointer.

public nint NativePointer { get; }

Property Value

nint