[Mono-bugs] [Bug 576775] p/invoke function pointers unsupported
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Feb 19 17:10:12 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=576775
http://bugzilla.novell.com/show_bug.cgi?id=576775#c2
--- Comment #2 from Zachary Griswold <zach.griswold at gmail.com> 2010-02-19 22:10:12 UTC ---
"I haven't tested passing a C# delegate to a native C function to see if C->C#
via a delegate->function pointer works (via
Marshal.GetFunctionPointerForDelegate)."
That answers the second part to my question, glad to hear it works :)
"You can only pinvoke static delegates, and you must decorate the target with a
special attribute to teach the AOT compiler how to compile the wrappers"
So to answer the first part of my question, there is no support (or plans
thereof) to support something like the following:
-----------------------
public delegate int InstanceAdder(IntPtr obj, IntPtr sel, int x, int y);
[DllImport(MonoTouch.Constants.ObjectiveCLibrary, EntryPoint="objc_msgSend")]
public static extern InstanceAdder InstanceAdder_objc_msgSend_sel(IntPtr obj,
IntPtr sel, IntPtr arg1);
-----------------------
Thanks!
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list