mono-api-unsorted.html

`mono_bounded_array_class_get`
Syntax
MonoClass* mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)

Parameters

element_class | element class
rank | the dimension of the array class
bounded | whenever the array has non-zero bounds

Return value
A class object describing the array with element type element_type and dimension rank.
`mono_check_corlib_version`
Syntax
const char* mono_check_corlib_version (void)

Return value
`NULL` if the runtime will work with the corlib, or a `g_malloc` allocated string with the error otherwise.
Description
Checks that the corlib that is loaded matches the version of this runtime.
`mono_compile_method`
Syntax
gpointer mono_compile_method (MonoMethod *method)

Parameters

method | The method to compile.

Description
This JIT-compiles the method, and returns the pointer to the native code produced.
`mono_config_for_assembly`
Syntax
void mono_config_for_assembly (MonoImage *assembly)

`mono_dllmap_insert`
Syntax
void mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, const char *tdll, const char *tfunc)

Parameters

assembly | if `NULL`, this is a global mapping, otherwise the remapping of the dynamic library will only apply to the specified assembly
dll | The name of the external library, as it would be found in the `DllImport` declaration. If prefixed with `i:` the matching of the library name is done without case sensitivity
func | if not null, the mapping will only applied to the named function (the value of `EntryPoint`)
tdll | The name of the library to map the specified dll if it matches.
tfunc | The name of the function that replaces the invocation. If `NULL`, it is replaced with a copy of func.

Description

LOCKING: Acquires the loader lock.

This function is used to programatically add `DllImport` remapping in either a specific assembly, or as a global remapping. This is done by remapping references in a `DllImport` attribute from the dll library name into the tdll name. If the dll name contains the prefix `i:`, the comparison of the library name is done without case sensitivity.

If you pass func, this is the name of the `EntryPoint` in a `DllImport` if specified or the name of the function as determined by `DllImport`. If you pass func, you must also pass tfunc which is the name of the target function to invoke on a match.

Example:

`mono_dllmap_insert (`NULL`, "i:libdemo.dll", `NULL`, relocated_demo_path, `NULL`);`

The above will remap `DllImport` statements for `libdemo.dll` and `LIBDEMO.DLL` to the contents of `relocated_demo_path` for all assemblies in the Mono process.

NOTE: This can be called before the runtime is initialized, for example from `mono_config_parse`.
`mono_free_method`
Syntax
void mono_free_method (MonoMethod *method)

`mono_free_verify_list`
Syntax
void mono_free_verify_list (GSList *list)

`mono_get_config_dir`
Syntax
const char* mono_get_config_dir (void)

`mono_get_corlib`
Syntax
MonoImage* mono_get_corlib (void)

Return value
The `MonoImage` for mscorlib.dll
Description
Use this function to get the `MonoImage*` for the `mscorlib.dll` assembly
`mono_get_delegate_invoke`
Syntax
MonoMethod* mono_get_delegate_invoke (MonoClass *klass)

Parameters

klass | The delegate class

Return value
the `MonoMethod` for the `Invoke` method in the delegate class or `NULL` if klass is a broken delegate type
`mono_get_method_full`
Syntax
MonoMethod* mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass, MonoGenericContext *context)

`mono_get_method`
Syntax
MonoMethod* mono_get_method (MonoImage *image, guint32 token, MonoClass *klass)

`mono_get_root_domain`
Syntax
MonoDomain* mono_get_root_domain (void)

Return value
the root appdomain, to obtain the current domain, use mono_domain_get ()
Description

The root AppDomain is the initial domain created by the runtime when it is initialized. Programs execute on this AppDomain, but can create new ones later. Currently there is no unmanaged API to create new AppDomains, this must be done from managed code.

`mono_lookup_internal_call`
Syntax
gpointer mono_lookup_internal_call (MonoMethod *method)

`mono_lookup_pinvoke_call`
Syntax
gpointer mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char **exc_arg)

`mono_parse_default_optimizations`
Syntax
int mono_parse_default_optimizations (const char* p)

`mono_ptr_class_get`
Syntax
MonoClass* mono_ptr_class_get (MonoType *type)

`mono_register_bundled_assemblies`
Syntax
void mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies)

`mono_runtime_class_init`
Syntax
void mono_runtime_class_init (MonoVTable *vtable)

Parameters

vtable | vtable that needs to be initialized

Description
This routine calls the class constructor for vtable.
`mono_runtime_cleanup`
Syntax
void mono_runtime_cleanup (MonoDomain *domain)

Parameters

domain | unused.

Description

Internal routine.

This must not be called while there are still running threads executing managed code.
`mono_runtime_get_main_args`
Syntax
MonoArray* mono_runtime_get_main_args (void)

Return value
A `MonoArray` with the arguments passed to the main program
`mono_runtime_init`
Syntax
void mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb, MonoThreadAttachCB attach_cb)

Parameters

domain | domain returned by `mono_init`

Description

Initialize the core AppDomain: this function will run also some IL initialization code, so it needs the execution engine to be fully operational.

`AppDomain.SetupInformation` is set up in `mono_runtime_exec_main`, where we know the `entry_assembly`.

`mono_runtime_is_shutting_down`
Syntax
gboolean mono_runtime_is_shutting_down (void)

Parameters

P | System.Environment.HasShutdownStarted property.

Return value
whether the runtime has been flagged for shutdown.
`mono_runtime_object_init`
Syntax
void mono_runtime_object_init (MonoObject *this_obj)

Parameters

this_obj | the object to initialize

Description
This function calls the zero-argument constructor (which must exist) for the given object.
`mono_runtime_quit`
Syntax
void mono_runtime_quit ()

`mono_runtime_run_main`
Syntax
int mono_runtime_run_main (MonoMethod *method, int argc, char* argv[], MonoObject **exc)

Parameters

method | the method to start the application with (usually `Main`)
argc | number of arguments from the command line
argv | array of strings from the command line
exc | excetption results

Description
Execute a standard `Main` method (argc / argv contains the executable name). This method also sets the command line argument value needed by `System.Environment`.
`mono_table_info_get_rows`
Syntax
int mono_table_info_get_rows (const MonoTableInfo *table)