Re: [Mono-dev] Invoking .net interface method from c api

2015-08-24 Thread zebrajap
Hi Robert, Ya its working. Thanks to you I have resolved lot of unknowns for me. Really appreciate your help. Keep up the good work. Thanks. Sameera -- View this message in context: http://mono.1490590.n4.nabble.com/Invoking-net-interface-method-from-c-api-tp4666493p4666523.html Sent from

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-21 Thread Robert Jordan
On 21.08.2015 11:43, zebrajap wrote: Oh. I got your point. The build output have System.dll in multiple places. ./lib/mono/2.0/System.dll ./lib/mono/4.5/System.dll *./lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll* ./lib/mono/4.0/System.dll I was loading it from

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-21 Thread zebrajap
Oh. I got your point. The build output have System.dll in multiple places. ./lib/mono/2.0/System.dll ./lib/mono/4.5/System.dll *./lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll* ./lib/mono/4.0/System.dll I was loading it from ./lib/mono/4.0/System.dll. I am loading it as follows.

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-21 Thread Robert Jordan
On 21.08.2015 06:44, zebrajap wrote: Now I am getting a different error. 104 MonoObject* pIcc = mono_runtime_invoke(pMethodCreateCompiler, pCodeProvider, NULL, NULL); (gdb) p pMethodCreateCompiler $1 = (MonoMethod *) 0x6aa288 (gdb) n Unhandled Exception:

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread Robert Jordan
On 20.08.2015 11:17, zebrajap wrote: The build machine does not have mono installed. So I have copied the dlls from another similar machine to /home/sameeraj/assemblies/mono/1.0/. (I am not sure why I had to copy in to mono/1.0 but if I don't when the program runs it complains mscorlib should be

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread zebrajap
The build machine does not have mono installed. So I have copied the dlls from another similar machine to /home/sameeraj/assemblies/mono/1.0/. (I am not sure why I had to copy in to mono/1.0 but if I don't when the program runs it complains mscorlib should be in that folder.)

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread zebrajap
Hi, As Robert suggested I did the followings. 1. Downloaded mono source tarball 2. Extracted to Ubuntu machine 3. Ran ./autogen.sh to download external dependencies (This machine has internet) 4. Ran make get-moonlite-latest 5. Copied everything to a Suse Enterprise 11 sp3 machine. This machine

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread zebrajap
Thank you for the detail explanation. I will try with mono 4.0 installed to my system. -- View this message in context: http://mono.1490590.n4.nabble.com/Invoking-net-interface-method-from-c-api-tp4666493p4666505.html Sent from the Mono - Dev mailing list archive at Nabble.com.

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-20 Thread Robert Jordan
On 19.08.2015 17:31, zebrajap wrote: Thanks Robert. It still does not work. Was it working in your case ? Now I begin to wonder if there are any issues with my system Please show us the code where you're initializing the runtime. Robert ___

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-19 Thread zebrajap
Thanks for the help. I tried your suggestion but still it does not work. 92 MonoMethodDesc* pMethodDescCreateCompiler = mono_method_desc_new(System.CodeDom.Compiler.CodeDomProvider:CreateCompiler(), false); (gdb) n 93 MonoMethod* pMethodCreateCompiler =

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-19 Thread zebrajap
Thanks Robert. It still does not work. Was it working in your case ? Now I begin to wonder if there are any issues with my system -- View this message in context: http://mono.1490590.n4.nabble.com/Invoking-net-interface-method-from-c-api-tp4666493p4666497.html Sent from the Mono - Dev mailing

[Mono-dev] Invoking .net interface method from c api

2015-08-19 Thread zebrajap
I am trying to compile a source from c API of mono. Please see my code below. //System.CodeDom.Compiler.CompilerParameters parameters = new CompilerParameters(); MonoClass* pCompilerParamsClass = mono_class_from_name (pSystemImage, System.CodeDom.Compiler, CompilerParameters);

Re: [Mono-dev] Invoking .net interface method from c api

2015-08-19 Thread Robert Jordan
On 19.08.2015 08:39, zebrajap wrote: This code fails at MonoObject* pIcc = mono_runtime_invoke(pMethodCreateCompiler, pCodeProvider, NULL, NULL); line. What am I doing wrong. You're supposed to call mono_object_get_virtual_method () on the interface method prior to invoking it on a derived