I have a very simple C program that links against mono, heres part of the code :

MonoDomain *domain;
        char *file = "ManagedAssembly.exe";     
        
        char* exePath = getexedir(); //method that returns the exe directory
                
        mono_set_dirs (exePath, exePath);       
        
        
        mono_config_parse (NULL);       
        
        domain = mono_jit_init (file);  
        
        
        MonoAssembly *assembly;
        
        assembly = mono_domain_assembly_open (domain, file);
        if (!assembly)
                exit (2);
        /*
         * mono_jit_exec() will run the Main() method in the assembly.
         * The return value needs to be looked up from
         * System.Environment.ExitCode.
         */
        
        mono_jit_exec (domain, assembly, argc, argv);
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to