[Mono-list] mono_method_get_unmanaged_thunk

Robert Jordan robertj at gmx.net
Sat Jun 21 11:25:54 EDT 2008


Andrius Bentkus wrote:
> 
> Robert Jordan wrote:
>> mono_get_delegate_invoke () expects a delegate class as an
>> argument:
>>
>> static void*
>> gimme (MonoDelegate * obj)
>> {
>>      MonoMethod * method =mono_get_delegate_invoke (
>> 	mono_object_get_class ((MonoObject*)obj));
>> }
>>
> 
> This wont work, but i used the code from  

The code above definitely works for me.

> http://www.nabble.com/file/p18043758/libtest.c libtest.c  and 
> http://www.nabble.com/file/p18043758/thunks.cs thunks.cs  which i found in
> the /mono/tests directory in the revision of mono you told me to use.
> It seems to me that mono_method_get_unmanaged_thunk requires a function
> handle instead of a monomethod. 

Nope. It needs a MonoMethod*.

Robert



More information about the Mono-list mailing list