Images are the component of assemblies that actually hold the CIL code and metadata in the extended PE/COFF file.
Images are the actual elements in the runtime that contain the actual code being executed.
mono_image_open
fname | filename that points to the module we want to open |
status | An error condition is returned in this field |
MonoImage
or NULL
on error.
The caller holds a temporary reference to the returned image which should be cleared
when no longer needed by calling mono_image_close
.
if NULL
, then check the value of status for details on the errormono_image_open_full
mono_image_open_from_data
mono_image_open_from_data_full
mono_image_close
image | The image file we wish to close |
mono_image_addref
image | The image file we wish to add a reference to |
mono_image_load_file_for_image
mono_image_open_from_data_with_name
mono_image_load_module
mono_image_get_guid
mono_image_get_assembly
image | the MonoImage . |
mono_image_get_entry_point
image | the image where the entry point will be looked up. |
mono_image_get_filename
image | a MonoImage |
MonoImage
mono_image_get_name
name | a MonoImage |
mono_image_get_resource
image | the image where the resource will be looked up. |
offset | The offset to add to the resource |
size | a pointer to an int where the size of the resource will be stored |
This is a low-level routine that fetches a resource from the metadata that starts at a given offset. The size parameter is filled with the data field as encoded in the metadata.
mono_image_get_table_info
mono_image_get_table_rows
mono_image_is_dynamic
image | the MonoImage |
TRUE
if the image was created dynamically, FALSE
if not.
Determines if the given image was created dynamically through the
System.Reflection.Emit
API
mono_image_loaded_by_guid
Looks only in the global loaded images hash, will miss assemblies loaded into an AssemblyLoadContext.
mono_image_loaded
name | path or assembly name of the image to load |
MonoImage
, or NULL
on failure.
mono_image_lookup_resource
image | the image to look up the resource in |
res_id | A MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup. |
lang_id | The language id. |
name | the resource name to lookup. |
NULL
if not found, otherwise a pointer to the in-memory representation
of the given resource. The caller should free it using g_free
when no longer
needed.mono_image_strerror
status | an code indicating the result from a recent operation |
mono_get_method_constrained
constrained.
opcode.mono_image_strong_name_position
image | a MonoImage |
size | a guint32 pointer, or NULL . |
If the image has a strong name, and size is not NULL
, the value
pointed to by size will have the size of the strong name.
mono_image_get_public_key
image | a MonoImage |
size | a guint32 pointer, or NULL . |
NULL
if the image does not have a public key, or a pointer
to the public key.This is used to obtain the public key in the image.
If the image has a public key, and size is not NULL
, the value
pointed to by size will have the size of the public key.
mono_image_get_strong_name
image | a MonoImage |
size | a guint32 pointer, or NULL . |
NULL
if the image does not have a strong name, or a
pointer to the public key.
If the image has a strong name, and size is not NULL
, the value
pointed to by size will have the size of the strong name.
mono_image_has_authenticode_entry
image | the MonoImage |
TRUE
if the image contains an authenticode entry in the PE
directory.mono_image_rva_map
image | a MonoImage |
addr | relative virtual address (RVA) |
NULL
if the
RVA is not valid for this image. This is a low-level routine used by the runtime to map relative virtual address (RVA) into their location in memory.
mono_image_ensure_section_idx
image | The image we are operating on |
section | section number that we will load/map into memory |
TRUE
on success
This routine makes sure that we have an in-memory copy of
an image section (.text
, .rsrc
, .data
).
mono_image_ensure_section
image | The image we are operating on |
section | section name that we will load/map into memory |
TRUE
on success
This routine makes sure that we have an in-memory copy of an image section (.text, .rsrc, .data).
mono_image_init
mono_images_init
Initialize the global variables used by this module.
mono_images_cleanup
Free all resources used by this module.
mono_image_add_to_name_cache
mono_image_fixup_vtable
mono_image_loaded_by_guid_full
Looks only in the global loaded images hash, will miss assemblies loaded into an AssemblyLoadContext.
mono_image_loaded_full
name | path or assembly name of the image to load |
refonly | Check with respect to reflection-only loads? |
MonoImage
, or NULL
on failure.
This routine verifies that the given image is loaded. It checks either reflection-only loads only, or normal loads only, as specified by parameter.