linux-packaging-mono/docs/deploy/mono-api-image.html
Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

1086 lines
42 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<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-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;
<a href="#api:mono_load_image">mono_load_image</a>
MonoImage* <a href="#api:mono_image_open">mono_image_open</a> (const char *fname,
MonoImageOpenStatus *status);
<a href="#api:mono_image_open_full">mono_image_open_full</a>
<a href="#api:mono_image_open_from_data">mono_image_open_from_data</a>
<a href="#api:mono_image_open_from_data_full">mono_image_open_from_data_full</a>
void <a href="#api:mono_image_close">mono_image_close</a> (MonoImage *image);
void <a href="#api:mono_image_addref">mono_image_addref</a> (MonoImage *image);
<a href="#api:mono_image_load_file_for_image">mono_image_load_file_for_image</a>
<a href="#api:mono_image_open_from_data_with_name">mono_image_open_from_data_with_name</a>
MonoImage* <a href="#api:mono_image_load_module">mono_image_load_module</a> (MonoImage *image,
int idx);
<a href="#api:mono_image_get_guid">mono_image_get_guid</a>
MonoAssembly* <a href="#api:mono_image_get_assembly">mono_image_get_assembly</a> (MonoImage *image);
guint32 <a href="#api:mono_image_get_entry_point">mono_image_get_entry_point</a> (MonoImage *image);
const char* <a href="#api:mono_image_get_filename">mono_image_get_filename</a> (MonoImage *image);
const char* <a href="#api:mono_image_get_name">mono_image_get_name</a> (MonoImage *image);
const char* <a href="#api:mono_image_get_resource">mono_image_get_resource</a> (MonoImage *image,
guint32 offset,
guint32 *size);
<a href="#api:mono_image_get_table_info">mono_image_get_table_info</a>
<a href="#api:mono_image_get_table_rows">mono_image_get_table_rows</a>
gboolean <a href="#api:mono_image_is_dynamic">mono_image_is_dynamic</a> (MonoImage *image);
<a href="#api:mono_image_loaded_by_guid">mono_image_loaded_by_guid</a>
MonoImage* <a href="#api:mono_image_loaded">mono_image_loaded</a> (const char *name);
gpointer <a href="#api:mono_image_lookup_resource">mono_image_lookup_resource</a> (MonoImage *image,
guint32 res_id,
guint32 lang_id,
gunichar2 *name);
const char * <a href="#api:mono_image_strerror">mono_image_strerror</a> (MonoImageOpenStatus status);
MonoMethod* <a href="#api:mono_get_method_constrained">mono_get_method_constrained</a> (MonoImage *image,
guint32 token,
MonoClass *constrained_class;
guint32 <a href="#api:mono_image_strong_name_position">mono_image_strong_name_position</a> (MonoImage *image,
guint32 *size);
const char* <a href="#api:mono_image_get_public_key">mono_image_get_public_key</a> (MonoImage *image,
guint32 *size);
const char* <a href="#api:mono_image_get_strong_name">mono_image_get_strong_name</a> (MonoImage *image,
guint32 *size);
gboolean <a href="#api:mono_image_has_authenticode_entry">mono_image_has_authenticode_entry</a> (MonoImage *image);
<a href="#api:mono_image_rva_map">mono_image_rva_map</a>
int <a href="#api:mono_image_ensure_section_idx">mono_image_ensure_section_idx</a> (MonoImage *image,
int section);
int <a href="#api:mono_image_ensure_section">mono_image_ensure_section</a> (MonoImage *image,
const char *section);
<a href="#api:mono_image_init">mono_image_init</a>
void <a href="#api:mono_images_init">mono_images_init</a> (void);
void <a href="#api:mono_images_cleanup">mono_images_cleanup</a> (void);
<a href="#api:mono_image_add_to_name_cache">mono_image_add_to_name_cache</a>
<a href="#api:mono_image_fixup_vtable">mono_image_fixup_vtable</a>
<a href="#api:mono_image_loaded_by_guid_full">mono_image_loaded_by_guid_full</a>
<a href="#api:mono_image_loaded_full">mono_image_loaded_full</a>
<a href="#api:mono_lookup_icall_symbol">mono_lookup_icall_symbol</a>
</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_load_image"></a>
<div class="mapi">
<div class="mapi-entry "><code>mono_load_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">mono_load_image</div>
<p />
</div><!--mapi-description -->
</div><!--height container -->
</div> <!-- class=mapi -->
<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> filename that points to the module we want to open</td></td></tr><tr><td><i>status</i><td> An error condition is returned in this field</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
<div> An open image of type %MonoImage 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 mono_image_close ().
if <code>NULL</code>, then check the value of <i>status</i> for details on the error</div>
<div class="mapi-section">Description</div>
<div> <p /> </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">mono_image_open_full</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">mono_image_open_from_data</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">mono_image_open_from_data_full</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> The image file we wish to close</td></td></tr></tbody></table> <div class="mapi-section">Description</div>
<div> <p />
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> The image file we wish to add a reference to</td></td></tr></tbody></table> <div class="mapi-section">Description</div>
<div> <p />
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">mono_image_load_file_for_image</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">mono_image_open_from_data_with_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 class="mapi-section">Description</div>
<div> <p />
Load the module with the one-based index IDX from IMAGE and return it. Return <code>NULL</code> if
it cannot be loaded.</div>
</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">mono_image_get_guid</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> the MonoImage.</td></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> <p />
Use this routine to get the assembly that owns this image.
<p /></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> the image where the entry point will be looked up.</td></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> <p />
Use this routine to determine the metadata token for method that
has been flagged as the entry point.
<p /></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> a MonoImage</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
<div> the filename.
</div>
<div class="mapi-section">Description</div>
<div> <p />
Used to get the filename that hold the actual MonoImage
<p /></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> a MonoImage</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
<div> the name of the assembly.
</div>
<div class="mapi-section">Description</div>
<div> <p /> </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> the image where the resource will be looked up.</td></td></tr><tr><td><i>offset</i><td> The offset to add to the resource</td></td></tr><tr><td><i>size</i><td> a pointer to an int where the size of the resource will be stored</td></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">mono_image_get_table_info</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">mono_image_get_table_rows</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> the MonoImage</td></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
System.Reflection.Emit API
<p /></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">mono_image_loaded_by_guid</div>
<p />
</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> path or assembly name of the image to load</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
<div> the loaded MonoImage, or <code>NULL</code> on failure.
</div>
<div class="mapi-section">Description</div>
<div> <p />
This routine verifies that the given image is loaded. Reflection-only loads do not count.
<p /></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> the image to look up the resource in</td></td></tr><tr><td><i>res_id</i><td> A MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup.</td></td></tr><tr><td><i>lang_id</i><td> The language id.</td></td></tr><tr><td><i>name</i><td> the resource name to lookup.</td></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 g_free () when no longer
needed.</div>
<div class="mapi-section">Description</div>
<div> <p /> </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> an code indicating the result from a recent operation</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
<div> a string describing the error
</div>
<div class="mapi-section">Description</div>
<div> <p /> </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">Description</div>
<div> <p />
This is used when JITing the `constrained.' opcode.
<p />
This returns two values: the contrained method, which has been inflated
as the function return value; And the original CIL-stream method as
declared in cil_method. The later is used for verification.</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> a MonoImage</td></td></tr><tr><td><i>size</i><td> a guint32 pointer, or <code>NULL</code>.</td></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> a MonoImage</td></td></tr><tr><td><i>size</i><td> a guint32 pointer, or <code>NULL</code>.</td></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> a MonoImage</td></td></tr><tr><td><i>size</i><td> a guint32 pointer, or <code>NULL</code>.</td></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> the MonoImage</td></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> <p />
Use this routine to determine if the image has a Authenticode
Certificate Table.
<p /></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">mono_image_rva_map</div>
<p />
</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> The image we are operating on</td></td></tr><tr><td><i>section</i><td> section number that we will load/map into memory</td></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_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> The image we are operating on</td></td></tr><tr><td><i>section</i><td> section name that we will load/map into memory</td></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">mono_image_init</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">mono_image_add_to_name_cache</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">mono_image_fixup_vtable</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">mono_image_loaded_by_guid_full</div>
<p />
</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">mono_image_loaded_full</div>
<p />
</div><!--mapi-description -->
</div><!--height container -->
</div>
</div></body>
</html>