Table of Contents

Struct NativeFunction<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<TRet>

Type Parameters

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<TRet> Invoke { get; }

Property Value

delegate* unmanaged<TRet>

InvokeUnsafe

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

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

Property Value

delegate* unmanaged[SuppressGCTransition]<TRet>

Remarks

NativePointer

Gets the native function pointer.

public nint NativePointer { get; }

Property Value

nint