mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
</div>
<p/>
<b>Parameters</b>
<blockquote><dt><i>assembly:</i></dt><dd> reference to an assembly</dd><dt><i>argc:</i></dt><dd> argument count</dd><dt><i>argv:</i></dt><dd> argument vector</dd></blockquote>
<blockquote><dt><i>assembly_dir:</i></dt><dd> the base directory for assemblies</dd><dt><i>config_dir:</i></dt><dd> the base directory for configuration files</dd></blockquote>
<b>Remarks</b>
<p/>
This routine is used internally and by developers embedding
the runtime into their own applications.
There are a number of cases to consider: Mono as a system-installed
package that is available on the location preconfigured or Mono in
a relocated location.
If you are using a system-installed Mono, you can pass NULL
to both parameters. If you are not, you should compute both
directory values and call this routine.
The values for a given PREFIX are:
assembly_dir: PREFIX/lib
config_dir: PREFIX/etc
Notice that embedders that use Mono in a relocated way must
compute the location at runtime, as they will be in control
of where Mono is installed.
</div><aname="api:mono_main"></a>
<divclass="api">
<divclass="api-entry">mono_main</div>
<divclass="prototype">int
mono_main (int argc, char* argv[])
</div>
<p/>
<b>Parameters</b>
<blockquote><dt><i>argc:</i></dt><dd> number of arguments in the argv array</dd><dt><i>argv:</i></dt><dd> array of strings containing the startup arguments</dd></blockquote>
<b>Remarks</b>
<p/>
Launches the Mono JIT engine and parses all the command line options
in the same way that the mono command line VM would.
<blockquote><dt><i>domain:</i></dt><dd> Application domain</dd><dt><i>main_func:</i></dt><dd> function to invoke from the execution thread</dd><dt><i>main_args:</i></dt><dd> parameter to the main_func</dd></blockquote>
<b>Remarks</b>
<p/>
Launch a new thread to execute a function
main_func is called back from the thread with main_args as the
parameter. The callback function is expected to start Main()
eventually. This function then waits for all managed threads to
finish.
It is not necesseray anymore to execute managed code in a subthread,
so this function should not be used anymore by default: just
execute the code and then call mono_thread_manage ().
<blockquote><dt><i>domain_name:</i></dt><dd> name to give to the initial domain</dd><dt><i>filename:</i></dt><dd> filename to load on startup</dd></blockquote>
<b>Returns</b>
<blockquote> the initial domain.
</blockquote>
<b>Remarks</b>
<p/>
Used by the runtime, users should use mono_jit_init instead.
Creates the initial application domain and initializes the mono_defaults
structure.
This function is guaranteed to not run any IL code.
The runtime is initialized using the runtime version required by the
provided executable. The version is determined by looking at the exe
configuration file and the version PE field)
</div><aname="api:mono_init"></a>
<divclass="api">
<divclass="api-entry">mono_init</div>
<divclass="prototype">MonoDomain*
mono_init (const char *domain_name)
</div>
<p/>
<b>Returns</b>
<blockquote> the initial domain.
</blockquote>
<b>Remarks</b>
<p/><p/>
Creates the initial application domain and initializes the mono_defaults
structure.
This function is guaranteed to not run any IL code.
The runtime is initialized using the default runtime version.