How do I export a function with a Callback argument for use in c? I'm compiled with .NET 7 NativeAOT
using System;
using System.Runtime.InteropServices;
namespace classLib;
public class ClassLib
{
[UnmanagedCallersOnly(EntryPoint = "add")]
public static int Add(int a, int b, void (*func)() callback ){
}
}