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

zebrajap zebrajap at yahoo.com
Thu Aug 20 09:17:50 UTC 2015


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.)

	mono_set_dirs("/home/sameeraj/assemblies", ".");
	pDomain = mono_jit_init ("BuildDomain");
	
	MonoAssembly* pSystemAssembly = mono_domain_assembly_open (pDomain,
"/home/sameeraj/assemblies/mono/1.0/System.dll");
	pSystemImage = mono_assembly_get_image (pSystemAssembly);
	
	MonoAssembly* pMscorlibAssembly = mono_domain_assembly_open (pDomain,
"/home/sameeraj/assemblies/mono/1.0/mscorlib.dll");
	pMscorlibImage = mono_assembly_get_image (pMscorlibAssembly);

Thanks.



--
View this message in context: http://mono.1490590.n4.nabble.com/Invoking-net-interface-method-from-c-api-tp4666493p4666503.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list