Hi,
On 12.07.2013 15:06, [email protected] wrote:
// invoke the generic helper method
MonoObject *monoException = NULL;
void *hargs [2];
hargs [0] = methodInfo;
hargs [1] = mono_type_get_object(env.monoDomain, genericParameterType);
MonoMethod *genericMethod = (MonoMethod *)mono_runtime_invoke(helperMethod,
NULL, hargs, &monoException);
NSAssert(genericMethod, @"invalid"); // passes
You have to unbox the result of mono_runtime_invoke because it
returns the IntPtr boxed in a MonoObject*.
Something like that:
MonoObject* obj = mono_runtime_invoke (...)
MonoMethod* genericMethod = *(MonoMethod**) mono_object_unbox (obj);
Robert
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list