[Mono-bugs] [Bug 576775] p/invoke function pointers unsupported

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 19 16:18:20 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=576775

http://bugzilla.novell.com/show_bug.cgi?id=576775#c1


Geoff Norton <gnorton at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Geoff Norton <gnorton at novell.com> 2010-02-19 21:18:19 UTC ---
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.  The
following pattern will work:

delegate void SomeDelegate ();

[MonoPInvokeCallback (typeof (SomeDelegate))]
void SomeMethod () {
}

<snip>

Some_Pinvoke_Call (new SomeDelegate (SomeMethod));

-- 
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