public DelegateTask(usdiMonoDelegate f, object arg, string dbg_name = "") { m_func = f; m_arg = GCHandle.Alloc(arg); m_handle = usdiTaskCreateMonoDelegate(m_func, (IntPtr)m_arg, dbg_name); }
public DelegateTask(usdiMonoDelegate f, string dbg_name = "") { m_func = f; m_handle = usdiTaskCreateMonoDelegate(m_func, IntPtr.Zero, dbg_name); }
[DllImport("usdi")] public static extern IntPtr usdiTaskCreateMonoDelegate(usdiMonoDelegate func, IntPtr arg, string dbg_name);