Re: [Mono-dev] MonoMethod->MethodInfo

2015-02-14 Thread Jonathan Chambers
You could pass the manged MethodInfo* object directly into managed, retrieving it in native code by calling: mono_method_get_object Alternatively, you could pass a System.RuntimeMethodHandle struct into managed code (with the MonoMethod* as the value in that structure) and call MethodBase.GetMetho

Re: [Mono-dev] MonoMethod->MethodInfo

2015-02-14 Thread Greg Young
I have to pass by lookup values. My unmanaged is running in the context of a profiler. On Saturday, February 14, 2015, Jonathan Chambers wrote: > You could pass the manged MethodInfo* object directly into managed, > retrieving it in native code by calling: mono_method_get_object > > Alternativel

Re: [Mono-dev] MonoMethod->MethodInfo

2015-02-14 Thread Jeroen Frijters
If you know the module on the managed side, Module.ResolveMethod() can be used to get a MethodInfo from a token. Regards, Jeroen > -Original Message- > From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list- > boun...@lists.ximian.com] On Behalf Of Greg Young > Sent: Satu

Re: [Mono-dev] MonoMethod->MethodInfo

2015-02-15 Thread Greg Young
Now to get module on the unmanaged side. I figured it might be in MonoClass but have yet to find it there. Maybe I should be looking under the referenced MonoImage (though that doesn't seem quite right) On Sun, Feb 15, 2015 at 9:00 AM, Jeroen Frijters wrote: > If you know the module on the manage

Re: [Mono-dev] MonoMethod->MethodInfo

2015-02-15 Thread Konrad Kruczynski
Note however, that resolution via metadata token can only give you an open type, that is information about bound generic type is lost during MethodInfo -> MetadataToken -> MethodInfo (since, naturally, only open types are present in the assembly). -- BR, Konrad 2015-02-15 9:15 GMT+01:00 Greg You

Re: [Mono-dev] MonoMethod->MethodInfo

2015-02-15 Thread Greg Young
That is totally acceptable. Anyone with an idea where the Module identifier sits on monoclass? On Sun, Feb 15, 2015 at 10:52 AM, Konrad Kruczynski wrote: > Note however, that resolution via metadata token can only give you an open > type, that is information about bound generic type is lost duri