linux-packaging-mono/docs/deploy/mono-api-image.html
Xamarin Public Jenkins (auto-signing) 95fdb59ea6 Imported Upstream version 6.6.0.89
Former-commit-id: b39a328747c2f3414dc52e009fb6f0aa80ca2492
2019-09-24 08:53:40 +00:00

1094 lines
39 KiB
HTML

<?xml version="1.0" encoding="us-ascii"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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;
}
.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);
}
.mapi-entry code {
border: none;
background-color: transparent;
}
.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%;
}
</style>
</head>
<body>
<div class="mapi-docs">
<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>
<div class="mapi-header">
#include &lt;metadata/image.h&gt;
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>
<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*
mono_image_open (const char *fname, MonoImageOpenStatus *status)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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.
The caller holds a temporary reference to the returned image which should be cleared
when no longer needed by calling <code>mono_image_close</code>.
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>
<div class="mapi-prototype">MonoImage*
mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean refonly)
</div>
<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>
<div class="mapi-prototype">MonoImage*
mono_image_open_from_data (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status)
</div>
<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>
<div class="mapi-prototype">MonoImage*
mono_image_open_from_data_full (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly)
</div>
<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
mono_image_close (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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>
<div>
Closes an image file, deallocates all memory consumed and
unmaps all possible sections of the file</div>
</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
mono_image_addref (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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>
<div>
Increases the reference count of an image.</div>
</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>
<div class="mapi-prototype">MonoImage*
mono_image_load_file_for_image (MonoImage *image, int fileidx)
</div>
<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>
<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>
<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>
<div class="mapi-prototype">MonoImage*
mono_image_load_module (MonoImage *image, int idx)
</div>
<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>
<div class="mapi-prototype">const char*
mono_image_get_guid (MonoImage *image)
</div>
<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*
mono_image_get_assembly (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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.
</div>
<div class="mapi-section">Description</div>
<div>
Use this routine to get the assembly that owns this image.</div>
</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
mono_image_get_entry_point (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
</div>
<div class="mapi-section">Description</div>
<div>
Use this routine to determine the metadata token for method that
has been flagged as the entry point.</div>
</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*
mono_image_get_filename (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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.
</div>
<div class="mapi-section">Description</div>
<div>
Used to get the filename that hold the actual <code>MonoImage</code></div>
</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*
mono_image_get_name (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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.
</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*
mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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>.
</div>
<div class="mapi-section">Description</div>
<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>
</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>
<div class="mapi-prototype">const MonoTableInfo*
mono_image_get_table_info (MonoImage *image, int table_id)
</div>
<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>
<div class="mapi-prototype">int
mono_image_get_table_rows (MonoImage *image, int table_id)
</div>
<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
mono_image_is_dynamic (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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.
</div>
<div class="mapi-section">Description</div>
<div>
<p />
Determines if the given image was created dynamically through the
<code>System.Reflection.Emit</code> API</div>
</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>
<div class="mapi-prototype">MonoImage*
mono_image_loaded_by_guid (const char *guid)
</div>
<p />
<div class="mapi-section">Description</div>
<div>
<p />
Looks only in the global loaded images hash, will miss assemblies loaded
into an AssemblyLoadContext.</div>
</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*
mono_image_loaded (const char *name)
</div>
<p />
<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></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>
<div>
This routine verifies that the given image is loaded. Reflection-only loads do not count.</div>
</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
mono_image_lookup_resource (MonoImage *image, guint32 res_id, guint32 lang_id, gunichar2 *name)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
of the given resource. The caller should free it using <code>g_free</code> when no longer
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 *
mono_image_strerror (MonoImageOpenStatus status)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
</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)
</div>
<p />
<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>
<div class="mapi-section">Description</div>
<div>
This is used when JITing the <code>constrained.</code> opcode.</div>
</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
mono_image_strong_name_position (MonoImage *image, guint32 *size)
</div>
<p />
<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>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
is stored.</div>
<div class="mapi-section">Description</div>
<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>
</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*
mono_image_get_public_key (MonoImage *image, guint32 *size)
</div>
<p />
<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>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
to the public key.</div>
<div class="mapi-section">Description</div>
<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>
</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*
mono_image_get_strong_name (MonoImage *image, guint32 *size)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
pointer to the public key.</div>
<div class="mapi-section">Description</div>
<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>
</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
mono_image_has_authenticode_entry (MonoImage *image)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
directory.</div>
<div class="mapi-section">Description</div>
<div>
Use this routine to determine if the image has a Authenticode
Certificate Table.</div>
</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>
<div class="mapi-prototype">char*
mono_image_rva_map (MonoImage *image, guint32 addr)
</div>
<p />
<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>
<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>
</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
mono_image_ensure_section_idx (MonoImage *image, int section)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
</div>
<div class="mapi-section">Description</div>
<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>
</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)
</div>
<p />
<div class="mapi-section">Parameters</div>
<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
</div>
<div class="mapi-section">Description</div>
<div>
<p />
This routine makes sure that we have an in-memory copy of
an image section (.text, .rsrc, .data).
<p /></div>
</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>
<div class="mapi-prototype">void
mono_image_init (MonoImage *image)
</div>
<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>
<div>
<p />
Initialize the global variables used by this module.</div>
</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>
<div>
<p />
Free all resources used by this module.</div>
</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>
<div class="mapi-prototype">void
mono_image_add_to_name_cache (MonoImage *image, const char *nspace,
const char *name, guint32 index)
</div>
<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>
<div class="mapi-prototype">void
mono_image_fixup_vtable (MonoImage *image)
</div>
<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>
<div class="mapi-prototype">MonoImage*
mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
</div>
<p />
<div class="mapi-section">Description</div>
<div>
<p />
Looks only in the global loaded images hash, will miss assemblies loaded
into an AssemblyLoadContext.</div>
</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>
<div class="mapi-prototype">MonoImage*
mono_image_loaded_full (const char *name, gboolean refonly)
</div>
<p />
<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>
<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>
</div><!--mapi-description -->
</div><!--height container -->