2019-02-04 20:11:37 +00:00
<?xml version="1.0" encoding="us-ascii"?>
2015-04-26 19:10:23 +01:00
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
2016-08-03 10:59:49 +00:00
< title > mono-api-image.html< / title >
< style type = "text/css" >
.mapi-docs {
line-height: 1.5;
padding-left: 2em;
padding-right: 2em;
}
.mapi-docs p {
max-width: 60em;
}
.mapi-docs .mapi-body {
max-width: 60em;
}
.mapi-docs code {
border: 1px solid rgba(214,214,214,1);
background-color: rgba(249,249,249,1);
padding: 0.1em 0.5em;
}
.mapi-description code {
font-family: "Consolas", "Courier", monospace;
border: 1px solid rgba(214,214,214,1);
background-color: rgba(249,249,249,1);
padding: 0.1em 0.2em;
}
.mapi-header {
padding: 0 0 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
border: 1px solid rgba(233,233,233,1);
background-color: rgba(249,249,249,1);
}
.mapi-code {
padding: 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
border: 1px solid rgba(233,233,233,1);
background-color: rgba(249,249,249,1);
}
.mapi-code:first-line {
line-height: 0px;
}
2018-01-24 17:04:36 +00:00
.mapi-codeblock {
display: block;
padding: 5pt 5pt;
margin: 10pt;
white-space: pre;
font-family: monospace;
border: 1px solid rgba(233,233,233,1);
background-color: rgba(249,249,249,1);
}
2016-08-03 10:59:49 +00:00
.mapi-entry code {
border: none;
background-color: transparent;
}
2015-04-26 19:10:23 +01:00
2016-08-03 10:59:49 +00:00
.mapi-parameters {
border-collapse: collapse;
border-spacing: 0;
empty-cells: hide;
border: 0;
margin: 5px 0 26px;
}
.mapi-parameters td {
border: 1px solid rgba(214,214,214,1);
border-left-style: none;
padding: 5px 25px 5px 10px;
}
.mapi-parameters tr>td:last-child {
border-right: 0;
}
.mapi-parameters td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px;
}
.mapi-parameters tr:last-child>td {
border-bottom: 0;
}
.mapi-parameters tr:first-child>td {
border-top: 0;
}
.mapi-parameters tr td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px;
}
.mapi {
left: -25px;
margin: 0;
padding: 13px 25px 0;
position: relative;
width: 100%;
}
.mapi-description {
background: rgba(249,249,249,1);
border-bottom: 1px solid rgba(233,233,233,1);
left: -25px;
margin: 0;
padding: 13px 25px 0;
position: relative;
width: 100%;
}
.mapi-entry {
background: transparent;
}
.mapi-docs {
}
.mapi-prototype {
border-left: 5px solid rgba(205,233,244,1);
padding: .5em;
margin-top: 5pt;
margin-bottom: 5pt;
font-family: "Consolas", "Courier", monospace;
display: block;
overflow: auto;
background-color: #f9f9f9;
}
.mapi-declaration {
margin-top: 21px;
}
.mapi-section {
font-size: smaller;
font-weight: bold;
margin-top: 21px;
line-height: 1.5;
}
.mapi-strike {
text-decoration: line-through;
}
.mapi-deprecated {
color: red;
}
.mapi-ptr-container {
background: white;
border-bottom: 1px solid rgba(233,233,233,1);
left: -25px;
padding-left: 25px;
padding-right: 25px;
padding-bottom: 13px;
position: relative;
width: 100%;
}
.mapi-ptr {
background: rgba(249,249,249,1);
border-left: 1px solid rgba(233,233,233,1);
border-top: 1px solid rgba(233,233,233,1);
height: 12px;
left: 37px;
top: -7px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
width: 12px;
}
.mapi-height-container {
left: -25px;
padding: 0 25px;
position: relative;
width: 100%;
}
2015-04-26 19:10:23 +01:00
< / style >
< / head >
< body >
2016-08-03 10:59:49 +00:00
< div class = "mapi-docs" >
2015-04-26 19:10:23 +01:00
< h2 > Image Manipulation< / h2 >
< p / > Images are the component of assemblies that actually hold
the CIL code and < a href = "mono-api-metadata.html" > metadata< / a >
in the extended PE/COFF file.
< h3 > Synopsis< / h3 >
2016-08-03 10:59:49 +00:00
< div class = "mapi-header" >
2015-04-26 19:10:23 +01:00
#include < metadata/image.h>
typedef struct _MonoImage MonoImage;
typedef enum {
MONO_IMAGE_OK,
MONO_IMAGE_ERROR_ERRNO,
MONO_IMAGE_MISSING_ASSEMBLYREF,
MONO_IMAGE_IMAGE_INVALID
} MonoImageOpenStatus;
< / div >
< h3 > Image APIs< / h3 >
< p / > Images are the actual elements in the runtime that contain
the actual code being executed.
< h3 > Opening and closing MonoImages< / h3 >
2016-08-03 10:59:49 +00:00
< a name = "api:mono_image_open" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_open< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > MonoImage*
2015-04-26 19:10:23 +01:00
mono_image_open (const char *fname, MonoImageOpenStatus *status)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > fname< / i > < / td > < td > filename that points to the module we want to open< / td > < / tr > < tr > < td > < i > status< / i > < / td > < td > An error condition is returned in this field< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > An open image of type < code > MonoImage< / code > or < code > NULL< / code > on error.
2015-04-26 19:10:23 +01:00
The caller holds a temporary reference to the returned image which should be cleared
2017-06-07 13:16:24 +00:00
when no longer needed by calling < code > mono_image_close< / code > .
2016-08-03 10:59:49 +00:00
if < code > NULL< / code > , then check the value of < i > status< / i > for details on the error< / div >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_open_full" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_open_full< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean refonly)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_open_from_data" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_open_from_data< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_open_from_data (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_open_from_data_full" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_open_from_data_full< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_open_from_data_full (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_close" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_close< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > void
2015-04-26 19:10:23 +01:00
mono_image_close (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > The image file we wish to close< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
Closes an image file, deallocates all memory consumed and
unmaps all possible sections of the file< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_addref" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_addref< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > void
2015-04-26 19:10:23 +01:00
mono_image_addref (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > The image file we wish to add a reference to< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
Increases the reference count of an image.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_load_file_for_image" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_load_file_for_image< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_load_file_for_image (MonoImage *image, int fileidx)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_open_from_data_with_name" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_open_from_data_with_name< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_open_from_data_with_name (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, const char *name)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_load_module" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_load_module< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_load_module (MonoImage *image, int idx)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< h3 > Image Information< / h3 >
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_guid" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_guid< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > const char*
mono_image_get_guid (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_assembly" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_assembly< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > MonoAssembly*
2015-04-26 19:10:23 +01:00
mono_image_get_assembly (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > the < code > MonoImage< / code > .< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the assembly that holds this image.
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
Use this routine to get the assembly that owns this image.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_entry_point" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_entry_point< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > guint32
2015-04-26 19:10:23 +01:00
mono_image_get_entry_point (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > the image where the entry point will be looked up.< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the token for the entry point method in the image
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
Use this routine to determine the metadata token for method that
has been flagged as the entry point.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_filename" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_filename< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > const char*
2015-04-26 19:10:23 +01:00
mono_image_get_filename (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > a < code > MonoImage< / code > < / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the filename.
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
Used to get the filename that hold the actual < code > MonoImage< / code > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_name" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_name< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > const char*
2015-04-26 19:10:23 +01:00
mono_image_get_name (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > name< / i > < / td > < td > a < code > MonoImage< / code > < / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the name of the assembly.
2016-08-03 10:59:49 +00:00
< / div >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_resource" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_resource< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > const char*
2015-04-26 19:10:23 +01:00
mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > the image where the resource will be looked up.< / td > < / tr > < tr > < td > < i > offset< / i > < / td > < td > The offset to add to the resource< / td > < / tr > < tr > < td > < i > size< / i > < / td > < td > a pointer to an int where the size of the resource will be stored< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the pointer to the resource whose offset is < i > offset< / i > .
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
This is a low-level routine that fetches a resource from the
metadata that starts at a given < i > offset< / i > . The < i > size< / i > parameter is
filled with the data field as encoded in the metadata.
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_table_info" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_table_info< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > const MonoTableInfo*
mono_image_get_table_info (MonoImage *image, int table_id)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_table_rows" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_table_rows< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > int
mono_image_get_table_rows (MonoImage *image, int table_id)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_is_dynamic" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_is_dynamic< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > gboolean
2015-04-26 19:10:23 +01:00
mono_image_is_dynamic (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > the < code > MonoImage< / code > < / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > TRUE< / code > if the image was created dynamically, < code > FALSE< / code > if not.
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
Determines if the given image was created dynamically through the
< code > System.Reflection.Emit< / code > API< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_loaded_by_guid" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_loaded_by_guid< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_loaded_by_guid (const char *guid)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
2019-09-24 08:53:40 +00:00
< div class = "mapi-section" > Description< / div >
< div >
< p / >
Looks only in the global loaded images hash, will miss assemblies loaded
into an AssemblyLoadContext.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_loaded" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_loaded< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > MonoImage*
2015-04-26 19:10:23 +01:00
mono_image_loaded (const char *name)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > name< / i > < / td > < td > path or assembly name of the image to load< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the loaded < code > MonoImage< / code > , or < code > NULL< / code > on failure.
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
This routine verifies that the given image is loaded. Reflection-only loads do not count.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_lookup_resource" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_lookup_resource< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > gpointer
2015-04-26 19:10:23 +01:00
mono_image_lookup_resource (MonoImage *image, guint32 res_id, guint32 lang_id, gunichar2 *name)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > the image to look up the resource in< / td > < / tr > < tr > < td > < i > res_id< / i > < / td > < td > A < code > MONO_PE_RESOURCE_ID_< / code > that represents the resource ID to lookup.< / td > < / tr > < tr > < td > < i > lang_id< / i > < / td > < td > The language id.< / td > < / tr > < tr > < td > < i > name< / i > < / td > < td > the resource name to lookup.< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > NULL< / code > if not found, otherwise a pointer to the in-memory representation
2015-04-26 19:10:23 +01:00
2017-06-07 13:16:24 +00:00
of the given resource. The caller should free it using < code > g_free< / code > when no longer
2016-08-03 10:59:49 +00:00
needed.< / div >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_strerror" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_strerror< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > const char *
2015-04-26 19:10:23 +01:00
mono_image_strerror (MonoImageOpenStatus status)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > status< / i > < / td > < td > an code indicating the result from a recent operation< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > a string describing the error
2016-08-03 10:59:49 +00:00
< / div >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_get_method_constrained" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_get_method_constrained< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > MonoMethod*
mono_get_method_constrained (MonoImage *image, guint32 token, MonoClass *constrained_class,
MonoGenericContext *context, MonoMethod **cil_method)
2015-04-26 19:10:23 +01:00
2016-08-03 10:59:49 +00:00
< / div >
< p / >
2017-06-07 13:16:24 +00:00
< div class = "mapi-section" > Return value< / div >
< div > The contrained method, which has been inflated
as the function return value; and the original CIL-stream method as
declared in < i > cil_method< / i > . The latter is used for verification.< / div >
2016-08-03 10:59:49 +00:00
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
This is used when JITing the < code > constrained.< / code > opcode.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< h3 > Public Keys, Strong Names and Certificates< / h3 >
< / div > <!-- class=mapi -->
< a name = "api:mono_image_strong_name_position" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_strong_name_position< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > guint32
2015-04-26 19:10:23 +01:00
mono_image_strong_name_position (MonoImage *image, guint32 *size)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > a < code > MonoImage< / code > < / td > < / tr > < tr > < td > < i > size< / i > < / td > < td > a < code > guint32< / code > pointer, or < code > NULL< / code > .< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the position within the image file where the strong name
2016-08-03 10:59:49 +00:00
is stored.< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
If the image has a strong name, and < i > size< / i > is not < code > NULL< / code > , the value
pointed to by size will have the size of the strong name.
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_public_key" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_public_key< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > const char*
2015-04-26 19:10:23 +01:00
mono_image_get_public_key (MonoImage *image, guint32 *size)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > a < code > MonoImage< / code > < / td > < / tr > < tr > < td > < i > size< / i > < / td > < td > a < code > guint32< / code > pointer, or < code > NULL< / code > .< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > NULL< / code > if the image does not have a public key, or a pointer
2016-08-03 10:59:49 +00:00
to the public key.< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
This is used to obtain the public key in the < i > image< / i > .
< p / >
If the image has a public key, and < i > size< / i > is not < code > NULL< / code > , the value
pointed to by size will have the size of the public key.
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_get_strong_name" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_get_strong_name< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > const char*
2015-04-26 19:10:23 +01:00
mono_image_get_strong_name (MonoImage *image, guint32 *size)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > a MonoImage< / td > < / tr > < tr > < td > < i > size< / i > < / td > < td > a < code > guint32< / code > pointer, or < code > NULL< / code > .< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > NULL< / code > if the image does not have a strong name, or a
2016-08-03 10:59:49 +00:00
pointer to the public key.< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
If the image has a strong name, and < i > size< / i > is not < code > NULL< / code > , the value
pointed to by size will have the size of the strong name.
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_has_authenticode_entry" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_has_authenticode_entry< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > gboolean
2015-04-26 19:10:23 +01:00
mono_image_has_authenticode_entry (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > the < code > MonoImage< / code > < / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > TRUE< / code > if the image contains an authenticode entry in the PE
2016-08-03 10:59:49 +00:00
directory.< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
Use this routine to determine if the image has a Authenticode
Certificate Table.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< h3 > Low-level features< / h3 >
< / div > <!-- class=mapi -->
< a name = "api:mono_image_rva_map" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_rva_map< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > char*
mono_image_rva_map (MonoImage *image, guint32 addr)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
2017-06-07 13:16:24 +00:00
< div class = "mapi-section" > Parameters< / div >
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > a < code > MonoImage< / code > < / td > < / tr > < tr > < td > < i > addr< / i > < / td > < td > relative virtual address (RVA)< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the address in memory for the given RVA, or < code > NULL< / code > if the
RVA is not valid for this image. < / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
This is a low-level routine used by the runtime to map relative
virtual address (RVA) into their location in memory.
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_ensure_section_idx" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_ensure_section_idx< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > int
2015-04-26 19:10:23 +01:00
mono_image_ensure_section_idx (MonoImage *image, int section)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > The image we are operating on< / td > < / tr > < tr > < td > < i > section< / i > < / td > < td > section number that we will load/map into memory< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > TRUE< / code > on success
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
This routine makes sure that we have an in-memory copy of
an image section (< code > .text< / code > , < code > .rsrc< / code > , < code > .data< / code > ).
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_ensure_section" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_ensure_section< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > int
mono_image_ensure_section (MonoImage *image, const char *section)
2015-04-26 19:10:23 +01:00
2016-08-03 10:59:49 +00:00
< / div >
< p / >
< div class = "mapi-section" > Parameters< / div >
2017-06-07 13:16:24 +00:00
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > image< / i > < / td > < td > The image we are operating on< / td > < / tr > < tr > < td > < i > section< / i > < / td > < td > section name that we will load/map into memory< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > < code > TRUE< / code > on success
2016-08-03 10:59:49 +00:00
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
This routine makes sure that we have an in-memory copy of
an image section (.text, .rsrc, .data).
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_init" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_init< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > void
mono_image_init (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_images_init" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_images_init< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > void
mono_images_init (void)
< / div >
< p / >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
Initialize the global variables used by this module.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_images_cleanup" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_images_cleanup< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
< div class = "mapi-prototype" > void
mono_images_cleanup (void)
< / div >
< p / >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
Free all resources used by this module.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_add_to_name_cache" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_add_to_name_cache< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > void
mono_image_add_to_name_cache (MonoImage *image, const char *nspace,
const char *name, guint32 index)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_fixup_vtable" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_fixup_vtable< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > void
mono_image_fixup_vtable (MonoImage *image)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_loaded_by_guid_full" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_loaded_by_guid_full< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
2019-09-24 08:53:40 +00:00
< div class = "mapi-section" > Description< / div >
< div >
< p / >
Looks only in the global loaded images hash, will miss assemblies loaded
into an AssemblyLoadContext.< / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->
< / div > <!-- class=mapi -->
< a name = "api:mono_image_loaded_full" > < / a >
< div class = "mapi" >
< div class = "mapi-entry " > < code > mono_image_loaded_full< / code > < / div >
< div class = "mapi-height-container" >
< div class = "mapi-ptr-container" > < / div >
< div class = "mapi-description" >
< div class = "mapi-ptr" > < / div >
< div class = "mapi-declaration mapi-section" > Syntax< / div >
2017-06-07 13:16:24 +00:00
< div class = "mapi-prototype" > MonoImage*
mono_image_loaded_full (const char *name, gboolean refonly)
< / div >
2016-08-03 10:59:49 +00:00
< p / >
2017-06-07 13:16:24 +00:00
< div class = "mapi-section" > Parameters< / div >
< table class = "mapi-parameters" > < tbody > < tr > < td > < i > name< / i > < / td > < td > path or assembly name of the image to load< / td > < / tr > < tr > < td > < i > refonly< / i > < / td > < td > Check with respect to reflection-only loads?< / td > < / tr > < / tbody > < / table > < div class = "mapi-section" > Return value< / div >
< div > the loaded < code > MonoImage< / code > , or < code > NULL< / code > on failure.
< / div >
< div class = "mapi-section" > Description< / div >
2018-01-24 17:04:36 +00:00
< div >
< p / >
This routine verifies that the given image is loaded.
It checks either reflection-only loads only, or normal loads only, as specified by parameter.
< p / > < / div >
2016-08-03 10:59:49 +00:00
< / div > <!-- mapi - description -->
< / div > <!-- height container -->