return Marshal.GetDelegateForFunctionPointer<T>(ret);
Now delegate unmaged<....>....
[DllImport(dl)]
private static extern void *dlsym(void *so_handle, sbyte *func_name);
....
public static delegate *<string[], sbyte *, int, delegate* unmanaged[Cdecl]<sbyte *, void>, int> pfnMain_p_new;
....
pfnMain_p_new = (delegate *<string[], sbyte *, int, delegate* unmanaged[Cdecl]<sbyte *, void>, int> )dlsym(hEngine, StringFromHeap("Host_Main"));
if (pfnMain_p_new == null)
{
Console.WriteLine("Unable to pass function name {0}", GetError());
}
....
And you can download for C# If you have to use SDL3 and ConversionFunction for sbyte *
and string
.You must log in to post a comment. You can login or register a new account.