[Mono-list] mono_method_get_unmanaged_thunk

Robert Jordan robertj at gmx.net
Sat Jun 21 05:13:10 EDT 2008

Andrius Bentkus wrote:
> I downloaded the sources from 2008 05 03 (since your patch was released that
> day), ran the patch against the sources, compiled everything. 

You must get at least r102706 which was committed 2008-05-07 05:41:34
-0400 (Wed, 07 May 2008)

> I decided to test the function  with this example:
> http://www.nabble.com/file/p18039829/test.cs test.cs 
> http://www.nabble.com/file/p18039829/teste.c teste.c 
> I compiled the c code using the custom libmono.so.0 (setting the new search
> directory with -L)
> I set the custom libmono.so.0 with LD_PRELOAD and ran
> it(LD_PRELOAD=".../libmono.so.0" ./teste), but the executable throws some
> crazy exceptions after calling the mono_get_delegate_invoke: 
> http://www.nabble.com/file/p18039829/exception.txt exception.txt 
> What am I doing wrong?

mono_get_delegate_invoke () expects a delegate class as an

static void*
gimme (MonoDelegate * obj)
     MonoMethod * method =mono_get_delegate_invoke (
	mono_object_get_class ((MonoObject*)obj));


More information about the Mono-list mailing list