[btls] Pass CC and CXX to the BTLS CMake and disable BTLS on older GCC (#4200)
[mono-project.git] / docs / sources / mono-api-assembly.html
blob0f46f26805cc07bc16a8eda9fdec56ee7ae4d8eb
1 <h2>Assemblies</h2>
3 <p>Code in .NET and Mono is distributed in assemblies, there
4 are shipped typically in files with the extension .exe or
5 .dll, and they are files that extend
6 the <a href="https://en.wikipedia.org/wiki/Portable_Executable">Portable
7 Executable</a> file format to include the Common Intermediate
8 Language metadata and portable code.
10 <p>Assemblies are typically loaded either from a given file
11 path, or using an <a href="#assembly-name">Assembly Name</a>
12 to load them from the Global Assembly Cache.
14 <p>The Mono Assembly API contains method for dealing with
15 <a href="#assembly-name">assembly
16 names</a>, <a href="cil_assembly_load">loading assemblies</a>,
17 <a href="#working">accessing assembly
18 components</a>, <a href="#modules">modules</a> and
19 some <a href="#advanced">advanced</a> features.
21 <p>Assemblies contain one or
22 more images, the actual vessels for your code.
23 The <a href="mono-api-image.html">Image API</a> documents the
24 functions that operate on <code>MonoImage *</code>.
26 <h3>Synopsis</h3>
28 <div class="mapi-header">
29 #include &lt;metadata/assembly.h&gt;
31 typedef struct _MonoImage MonoImage;
32 typedef struct _MonoAssembly MonoAssembly;
33 </div>
35 <a name="cil_assembly_load"/></a>
36 <h3>Assembly Loading</h3>
38 <h4><a name="api:mono_assembly_close">mono_assembly_close</a></h4>
39 <h4><a name="api:mono_assembly_get_object">mono_assembly_get_object</a></h4>
40 <h4><a name="api:mono_assembly_load">mono_assembly_load</a></h4>
41 <h4><a name="api:mono_assembly_load_full">mono_assembly_load_full</a></h4>
42 <h4><a name="api:mono_assembly_loaded">mono_assembly_loaded</a></h4>
43 <h4><a name="api:mono_assembly_load_from">mono_assembly_load_from</a></h4>
44 <h4><a name="api:mono_assembly_load_from_full">mono_assembly_load_from_full</a></h4>
45 <h4><a name="api:mono_assembly_load_with_partial_name">mono_assembly_load_with_partial_name</a></h4>
46 <h4><a name="api:mono_assembly_open">mono_assembly_open</a></h4>
47 <h4><a name="api:mono_assembly_open_full">mono_assembly_open_full</a></h4>
48 <h4><a name="api:mono_set_assemblies_path">mono_set_assemblies_path</a></h4>
49 <h4><a name="api:mono_set_rootdir">mono_set_rootdir</a></h4>
51 <a name="working"/>
52 <h3>Working with Assemblies</h3>
54 <h4><a name="api:mono_assembly_fill_assembly_name">mono_assembly_fill_assembly_name</a></h4>
55 <h4><a name="api:mono_assembly_foreach">mono_assembly_foreach</a></h4>
56 <h4><a name="api:mono_assembly_get_image">mono_assembly_get_image</a></h4>
57 <h4><a name="api:mono_assembly_get_main">mono_assembly_get_main</a></h4>
58 <h4><a name="api:mono_assembly_get_name">mono_assembly_get_name</a></h4>
59 <h4><a name="api:mono_assembly_getrootdir">mono_assembly_getrootdir</a></h4>
60 <h4><a name="api:mono_assembly_get_assemblyref">mono_assembly_get_assemblyref</a></h4>
61 <h4><a name="api:mono_assembly_loaded_full">mono_assembly_loaded_full</a></h4>
62 <h4><a name="api:mono_assembly_load_reference">mono_assembly_load_reference</a></h4>
63 <h4><a name="api:mono_assembly_load_references">mono_assembly_load_references</a></h4>
64 <h4><a name="api:mono_assembly_load_module">mono_assembly_load_module</a></h4>
65 <h4><a name="api:mono_assembly_invoke_load_hook">mono_assembly_invoke_load_hook</a></h4>
66 <h4><a name="api:mono_assembly_invoke_search_hook">mono_assembly_invoke_search_hook</a></h4>
67 <h4><a name="api:mono_assembly_set_main">mono_assembly_set_main</a></h4>
68 <h4><a name="api:mono_assembly_setrootdir">mono_assembly_setrootdir</a></h4>
69 <h4><a name="api:mono_register_config_for_assembly">mono_register_config_for_assembly</a></h4>
70 <h4><a name="api:mono_register_symfile_for_assembly">mono_register_symfile_for_assembly</a></h4>
72 <a name="assembly-name"></a>
73 <h3>Assembly Names</h3>
75 <p>The MonoAssemblyName contains the full identity of an
76 assembly (name, culture, public key, public key token,
77 version and any other flags).
79 <p>These unmanaged objects represent the <a
80 href="http://www.mono-project.com/monodoc/T:System.Reflection.AssemblyName">System.Reflection.AssemblyName</a>
81 managed type.
83 <h4><a name="api:mono_assembly_name_new">mono_assembly_name_new</a></h4>
84 <h4><a name="api:mono_assembly_name_get_name">mono_assembly_name_get_name</a></h4>
85 <h4><a name="api:mono_assembly_name_get_culture">mono_assembly_name_get_culture</a></h4>
86 <h4><a name="api:mono_assembly_name_get_version">mono_assembly_name_get_version</a></h4>
87 <h4><a name="api:mono_assembly_name_get_pubkeytoken">mono_assembly_name_get_pubkeytoken</a></h4>
88 <h4><a name="api:mono_assembly_name_free">mono_assembly_name_free</a></h4>
89 <h4><a name="api:mono_stringify_assembly_name">mono_stringify_assembly_name</a></h4>
90 <h4><a name="api:mono_assembly_names_equal">mono_assembly_names_equal</a></h4>
92 <a href="modules"/>
93 <h3>Modules</h3>
95 <p>An assembly is made up of one or more modules.
97 <h4><a name="api:mono_module_file_get_object">mono_module_file_get_object</a></h4>
98 <h4><a name="api:mono_module_get_object">mono_module_get_object</a></h4>
101 <a href="advanced"/>
102 <h3>Advanced</h3>
104 <h4><a name="api:mono_install_assembly_load_hook">mono_install_assembly_load_hook</a></h4>
105 <h4><a name="api:mono_install_assembly_search_hook">mono_install_assembly_search_hook</a></h4>
106 <h4><a name="api:mono_install_assembly_refonly_search_hook">mono_install_assembly_refonly_search_hook</a></h4>
107 <h4><a name="api:mono_install_assembly_preload_hook">mono_install_assembly_preload_hook</a></h4>
108 <h4><a name="api:mono_install_assembly_refonly_preload_hook">mono_install_assembly_refonly_preload_hook</a></h4>
109 <h4><a name="api:mono_install_assembly_postload_search_hook">mono_install_assembly_postload_search_hook</a></h4>
110 <h4><a name="api:mono_install_assembly_postload_refonly_search_hook">mono_install_assembly_postload_refonly_search_hook</a></h4>