0510252385
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
2216 lines
80 KiB
HTML
2216 lines
80 KiB
HTML
<?xml version="1.0" encoding="us-ascii"?>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>mono-api-metadata.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">
|
|
<h1>Metadata Reading</h1>
|
|
|
|
<p />The Metadata API gives developers low-level access to the
|
|
information encoded in CLI modules: type and
|
|
methods definitions encoded in metadata as well as access to
|
|
the CIL code and embedded resources.
|
|
|
|
<p />Managed developers access this information using either the
|
|
System.Reflection API or a library
|
|
like <a href="http://www.mono-project.com/Cecil">Cecil</a>.
|
|
|
|
<p />To start using the Metadata API it is necessary
|
|
to <a href="mono-api-assembly.html#cil_assembly_load">open an
|
|
assembly</a> or a CIL image (a .dll or .exe file) using one of
|
|
the
|
|
<a href="mono-api-image.html#cil_image_open">CIL image
|
|
opening</a> API calls.
|
|
|
|
<h2>Metadata Heaps</h2>
|
|
|
|
<p />ECMA CLI images contain four heaps that store different
|
|
kinds of information, these are:
|
|
|
|
<ul>
|
|
<li>GUID heap (called #GUID) contains 128-bit GUIDs,
|
|
you can get pointer to a GUID value by
|
|
calling <a href="#api:mono_metadata_guid_heap">mono_metadata_guid_heap</a>.
|
|
|
|
<li>User string heap (called #US), it contains user
|
|
visible strings, you can fetch a string from this heap
|
|
by calling
|
|
<a href="#api:mono_metadata_user_string">mono_metadata_user_string</a>.
|
|
|
|
<li>Blob heap (called #blob), it contains binary
|
|
blobs of data, you can get a blob
|
|
by <a href="#api:mono_metadata_blob_heap">mono_metadata_blob_heap</a>.
|
|
You can determine the size of the blob using
|
|
the <a href="#api:mono_metadata_decode_blob_size">mono_metadata_decode_blob_size</a>.
|
|
|
|
</li></li></li></ul>
|
|
|
|
<p />The ECMA file format also has an extra section called the
|
|
"#~" stream, this stream is the one that holds the metadata
|
|
tables. There is a high-level API to get access to the
|
|
contents of this API, described in the
|
|
section <a href="#metadata-tables">Metadata Tables</a>.
|
|
|
|
<a name="api:mono_metadata_guid_heap"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_guid_heap</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_metadata_guid_heap (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> index into the guid heap.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> an in-memory pointer to the <i>index</i> in the guid heap.
|
|
</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_string_heap"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_string_heap</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_metadata_string_heap (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> index into the string heap.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> an in-memory pointer to the <i>index</i> in the string heap.
|
|
</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_blob_heap"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_blob_heap</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_metadata_blob_heap (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> index into the blob.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> an in-memory pointer to the <i>index</i> in the Blob heap.
|
|
</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_user_string"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_user_string</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_metadata_user_string (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> index into the user string heap.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> an in-memory pointer to the <i>index</i> in the user string heap (<code><code>US</code></code>).
|
|
</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_decode_blob_size"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_blob_size</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_metadata_decode_blob_size (const char *xptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>ptr</i></td><td> pointer to a blob object</td></tr><tr><td><i>rptr</i></td><td> the new position of the pointer</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the size of the blob object
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
This decodes a compressed size as described by 24.2.4 (<code>US</code> and <code>Blob</code> a blob or user string object)
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
|
|
<a name="metadata-tables"></a>
|
|
<h2>Metadata Tables</h2>
|
|
|
|
<p />Metadata is encoded in a number of tables included on every
|
|
CIL image. These tables contain type definitions, member
|
|
definitions and so on, these constants are defined in the ECMA 335
|
|
specification Partition II section 22. The following table
|
|
shows the C constants defined in the Mono runtime and how they
|
|
map to the equivalent ECMA CLI metadata table:
|
|
|
|
<center>
|
|
<table border="1">
|
|
<thead>
|
|
<td>
|
|
<b>ECMA CLI Table Name</b>
|
|
</td>
|
|
<td>
|
|
<b>C Constant Name</b>
|
|
</td>
|
|
<td>
|
|
<b>Table Schema (Array Size + Columns Constants)</b>
|
|
</td>
|
|
</thead>
|
|
<td>Assembly</td><td>MONO_TABLE_ASSEMBLY</td><td>
|
|
Array size:
|
|
MONO_ASSEMBLY_SIZE
|
|
<ul>
|
|
<li>MONO_ASSEMBLY_HASH_ALG
|
|
<li>MONO_ASSEMBLY_MAJOR_VERSION
|
|
<li>MONO_ASSEMBLY_MINOR_VERSION
|
|
<li>MONO_ASSEMBLY_BUILD_NUMBER
|
|
<li>MONO_ASSEMBLY_REV_NUMBER
|
|
<li>MONO_ASSEMBLY_FLAGS
|
|
<li>MONO_ASSEMBLY_PUBLIC_KEY
|
|
<li>MONO_ASSEMBLY_NAME
|
|
<li>MONO_ASSEMBLY_CULTURE
|
|
</li></li></li></li></li></li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>AssemblyOS</td><td>MONO_TABLE_ASSEMBLYOS</td><td>
|
|
Array size:
|
|
MONO_ASSEMBLYOS_SIZE
|
|
<ul>
|
|
<li>MONO_ASSEMBLYOS_PLATFORM
|
|
<li>MONO_ASSEMBLYOS_MAJOR_VERSION
|
|
<li>MONO_ASSEMBLYOS_MINOR_VERSION
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>AssemblyProcessor</td><td>MONO_TABLE_ASSEMBLYPROCESSOR</td><td>Array
|
|
size: MONO_ASSEMBLYPROCESSOR_SIZE
|
|
<ul>
|
|
<li>MONO_ASSEMBLY_PROCESSOR
|
|
</li></ul>
|
|
</td>
|
|
|
|
|
|
<td>AssemblyRef</td><td>MONO_TABLE_ASSEMBLYREF</td><td>
|
|
Array size:
|
|
MONO_ASSEMBLYREF_SIZE
|
|
<ul>
|
|
<li>MONO_ASSEMBLYREF_MAJOR_VERSION
|
|
<li>MONO_ASSEMBLYREF_MINOR_VERSION
|
|
<li>MONO_ASSEMBLYREF_BUILD_NUMBER
|
|
<li>MONO_ASSEMBLYREF_REV_NUMBER
|
|
<li>MONO_ASSEMBLYREF_FLAGS
|
|
<li>MONO_ASSEMBLYREF_PUBLIC_KEY
|
|
<li>MONO_ASSEMBLYREF_NAME
|
|
<li>MONO_ASSEMBLYREF_CULTURE
|
|
<li>MONO_ASSEMBLYREF_HASH_VALUE
|
|
</li></li></li></li></li></li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>AssemblyRefProcessor</td><td>MONO_TABLE_ASSEMBLYREFPROCESSOR</td><td>Array
|
|
size: MONO_ASSEMBLYREFPROC_SIZE
|
|
<ul>
|
|
<li>MONO_ASSEMBLYREFPROC_PROCESSOR
|
|
<li>MONO_ASSEMBLYREFPROC_ASSEMBLYREF
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>AssemblyRefOS</td><td>MONO_TABLE_ASSEMBLYREFOS</td><td>
|
|
Array size:
|
|
<li>MONO_ASSEMBLYREFOS_SIZE
|
|
<ul>
|
|
<li>MONO_ASSEMBLYREFOS_PLATFORM
|
|
<li>MONO_ASSEMBLYREFOS_MAJOR_VERSION
|
|
<li>MONO_ASSEMBLYREFOS_MINOR_VERSION
|
|
<li>MONO_ASSEMBLYREFOS_ASSEMBLYREF
|
|
</li></li></li></li></ul>
|
|
</li></td>
|
|
|
|
|
|
<td>ClassLayout</td><td>MONO_TABLE_CLASSLAYOUT</td><td>
|
|
Array size:
|
|
MONO_CLASSLAYOUT_SIZE
|
|
<ul>
|
|
<li>MONO_CLASS_LAYOUT_PACKING_SIZE
|
|
<li>MONO_CLASS_LAYOUT_CLASS_SIZE
|
|
<li>MONO_CLASS_LAYOUT_PARENT
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>Constant</td><td>MONO_TABLE_CONSTANT</td><td>
|
|
Array size:
|
|
MONO_CONSTANT_SIZE
|
|
<ul>
|
|
<li>MONO_CONSTANT_TYPE
|
|
<li>MONO_CONSTANT_PADDING
|
|
<li>MONO_CONSTANT_PARENT
|
|
<li>MONO_CONSTANT_VALUE
|
|
</li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>CustomAttribute</td><td>MONO_TABLE_CUSTOMATTRIBUTE</td><td>
|
|
Array size:
|
|
MONO_CUSTOM_ATTR_SIZE
|
|
<ul>
|
|
<li>MONO_CUSTOM_ATTR_PARENT
|
|
<li>MONO_CUSTOM_ATTR_TYPE
|
|
<li>MONO_CUSTOM_ATTR_VALUE
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>DeclSecurity</td><td>MONO_TABLE_DECLSECURITY</td><td>
|
|
Array size:
|
|
MONO_DECL_SECURITY_SIZE
|
|
<ul>
|
|
<li>MONO_DECL_SECURITY_ACTION
|
|
<li>MONO_DECL_SECURITY_PARENT
|
|
<li>MONO_DECL_SECURITY_PERMISSIONSET
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>EventMap</td><td>MONO_TABLE_EVENTMAP</td><td>
|
|
Array size:
|
|
MONO_EVENT_MAP_SIZE
|
|
<ul>
|
|
<li>MONO_EVENT_MAP_PARENT
|
|
<li>MONO_EVENT_MAP_EVENTLIST
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>EventPtr</td><td>MONO_TABLE_EVENT_POINTER</td><td>
|
|
Array size:
|
|
MONO_EVENT_POINTER_SIZE
|
|
<ul>
|
|
<li>MONO_EVENT_POINTER_EVENT
|
|
</li></ul>
|
|
</td>
|
|
|
|
|
|
<td>Event</td><td>MONO_TABLE_EVENT</td><td>
|
|
Array size: MONO_EVENT_SIZE
|
|
<ul>
|
|
<li>MONO_EVENT_FLAGS
|
|
<li>MONO_EVENT_NAME
|
|
<li>MONO_EVENT_TYPE
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>ExportedType</td><td>MONO_TABLE_EXPORTEDTYPE</td><td>
|
|
Array size:
|
|
MONO_EXPORTEDTYPE_SIZE
|
|
<ul>
|
|
<li>MONO_EXP_TYPE_FLAGS
|
|
<li>MONO_EXP_TYPE_TYPEDEF
|
|
<li>MONO_EXP_TYPE_NAME
|
|
<li>MONO_EXP_TYPE_NAMESPACE
|
|
<li>MONO_EXP_TYPE_IMPLEMENTATION
|
|
</li></li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>Field</td><td>MONO_TABLE_FIELD</td><td>
|
|
Array size: MONO_FIELD_SIZE
|
|
<ul>
|
|
<li>MONO_FIELD_FLAGS
|
|
<li>MONO_FIELD_NAME
|
|
<li>MONO_FIELD_SIGNATURE
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>FieldLayoutt</td><td>MONO_TABLE_FIELDLAYOUT</td><td>
|
|
Array size:
|
|
MONO_FIELDLAYOUT_SIZE
|
|
<ul>
|
|
<li>MONO_FIELD_LAYOUT_OFFSET
|
|
<li>MONO_FIELD_LAYOUT_FIELD
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>FieldMarshal</td><td>MONO_TABLE_FIELDMARSHAL</td><td>
|
|
Array size:
|
|
MONO_FIELD_MARSHAL_SIZE
|
|
<ul>
|
|
<li>MONO_FIELD_MARSHAL_PARENT
|
|
<li>MONO_FIELD_MARSHAL_NATIVE_TYPE
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>FieldPtr</td><td>MONO_TABLE_FIELD_POINTER</td><td>
|
|
Array size:
|
|
MONO_FIELD_POINTER_SIZE
|
|
<ul>
|
|
<li>MONO_FIELD_POINTER_FIELD
|
|
</li></ul>
|
|
</td>
|
|
|
|
|
|
<td>FieldRVA</td><td>MONO_TABLE_FIELDRVA</td><td>
|
|
Array size:
|
|
MONO_FIELDRVA_SIZE
|
|
<ul>
|
|
<li>MONO_FIELD_RVA_RVA
|
|
<li>MONO_FIELD_RVA_FIELD
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>File</td><td>MONO_TABLE_FILE</td><td>
|
|
Array size: MONO_FILE_SIZE
|
|
<ul>
|
|
<li>MONO_FILE_FLAGS
|
|
<li>MONO_FILE_NAME
|
|
<li>MONO_FILE_HASH_VALUE
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>GenericParam</td><td>MONO_TABLE_GENERICPARAM</td><td>
|
|
Array size:
|
|
MONO_GENERICPARAM_SIZE
|
|
<ul>
|
|
<li>MONO_GENERICPARAM_NUMBER
|
|
<li>MONO_GENERICPARAM_FLAGS
|
|
<li>MONO_GENERICPARAM_OWNER
|
|
<li>MONO_GENERICPARAM_NAME
|
|
</li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>GenericParamConstraint</td><td>MONO_TABLE_GENERICPARAMCONSTRAINT</td><td>Array
|
|
size: MONO_GENERICPARAMCONSTRAINT_SIZE
|
|
<ul>
|
|
<li>MONO_GENPARCONSTRAINT_GENERICPAR
|
|
<li>MONO_GENPARCONSTRAINT_CONSTRAINT
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
<tr>
|
|
<td>ImplMap</td><td>MONO_TABLE_IMPLMAP</td><td>
|
|
Array size:
|
|
MONO_IMPLMAP_SIZE
|
|
<ul>
|
|
<li>MONO_IMPLMAP_FLAGS
|
|
<li>MONO_IMPLMAP_MEMBER
|
|
<li>MONO_IMPLMAP_NAME
|
|
<li>MONO_IMPLMAP_SCOPE
|
|
</li></li></li></li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<td>InterfaceImpl</td><td>MONO_TABLE_INTERFACEIMPL</td><td>
|
|
Array size:
|
|
<li>MONO_INTERFACEIMPL_SIZE
|
|
<ul>
|
|
<li>MONO_INTERFACEIMPL_CLASS
|
|
<li>MONO_INTERFACEIMPL_INTERFACE
|
|
</li></li></ul>
|
|
</li></td>
|
|
|
|
|
|
|
|
<td>ManifestResource</td><td>MONO_TABLE_MANIFESTRESOURCE</td><td>Array
|
|
size: MONO_MANIFESTRESOURCE_SIZE
|
|
<ul>
|
|
<li>MONO_MANIFEST_OFFSET
|
|
<li>MONO_MANIFEST_FLAGS
|
|
<li>MONO_MANIFEST_NAME
|
|
<li>MONO_MANIFEST_IMPLEMENTATION
|
|
</li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<tr>
|
|
<td>MemberRef</td><td>MONO_TABLE_MEMBERREF</td><td>
|
|
Array size:
|
|
MONO_MEMBERREF_SIZE
|
|
<ul>
|
|
<li>MONO_MEMBERREF_CLASS
|
|
<li>MONO_MEMBERREF_NAME
|
|
<li>MONO_MEMBERREF_SIGNATURE
|
|
</li></li></li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<td>MethodImpl</td><td>MONO_TABLE_METHODIMPL</td><td>
|
|
Array size:
|
|
MONO_METHODIMPL_SIZE
|
|
<ul>
|
|
<li>MONO_METHODIMPL_CLASS
|
|
<li>MONO_METHODIMPL_BODY
|
|
<li>MONO_METHODIMPL_DECLARATION
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
|
|
<td>MethodSpec</td><td>MONO_TABLE_METHODSPEC</td><td>
|
|
Array size:
|
|
MONO_METHODSPEC_SIZE
|
|
<ul>
|
|
<li>MONO_METHODSPEC_METHOD
|
|
<li>MONO_METHODSPEC_SIGNATURE
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
<tr>
|
|
<td>MethodSemantics</td><td>MONO_TABLE_METHODSEMANTICS</td><td>Array
|
|
size: MONO_METHOD_SEMA_SIZE
|
|
<ul>
|
|
<li>MONO_METHOD_SEMA_SEMANTICS
|
|
<li>MONO_METHOD_SEMA_METHOD
|
|
<li>MONO_METHOD_SEMA_ASSOCIATION
|
|
</li></li></li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<td>Moduleref</td><td>MONO_TABLE_MODULEREF</td><td>
|
|
Array size:
|
|
MONO_MODULEREF_SIZE
|
|
<ul>
|
|
<li>MONO_MODULEREF_NAME
|
|
</li></ul>
|
|
</td>
|
|
|
|
|
|
<tr>
|
|
<td>Module</td><td>MONO_TABLE_MODULE</td><td>
|
|
Array size:
|
|
MONO_MODULE_SIZE
|
|
<br />
|
|
Columns:
|
|
<ul>
|
|
<li>MONO_MODULE_GENERATION
|
|
<li>MONO_MODULE_NAME
|
|
<li>MONO_MODULE_MVID
|
|
<li>MONO_MODULE_ENC
|
|
<li>MONO_MODULE_ENCBASE
|
|
</li></li></li></li></li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<td>TypeRef</td><td>MONO_TABLE_TYPEREF</td><td>
|
|
Array size:
|
|
MONO_TYPEREF_SIZE
|
|
<ul>
|
|
<li>MONO_TYPEREF_SCOPE
|
|
<li>MONO_TYPEREF_NAME
|
|
<li>MONO_TYPEREF_NAMESPACE
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<tr>
|
|
<td>MethodPtr</td><td>MONO_TABLE_METHOD_POINTER</td><td>
|
|
Array size:
|
|
MONO_METHOD_POINTER_SIZE
|
|
<ul>
|
|
<li>MONO_METHOD_POINTER_METHOD
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<td>Method</td><td>MONO_TABLE_METHOD</td><td>
|
|
Array size:
|
|
MONO_METHOD_SIZE
|
|
<ul>
|
|
<li>MONO_METHOD_RVA
|
|
<li>MONO_METHOD_IMPLFLAGS
|
|
<li>MONO_METHOD_FLAGS
|
|
<li>MONO_METHOD_NAME
|
|
<li>MONO_METHOD_SIGNATURE
|
|
<li>MONO_METHOD_PARAMLIST
|
|
</li></li></li></li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<tr>
|
|
<td>NestedClass</td><td>MONO_TABLE_NESTEDCLASS</td><td>
|
|
Array size:
|
|
MONO_NESTEDCLASS_SIZE
|
|
<ul>
|
|
<li>MONO_NESTED_CLASS_NESTED
|
|
<li>MONO_NESTED_CLASS_ENCLOSING
|
|
</li></li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>ParamPtr</td><td>MONO_TABLE_PARAM_POINTER</td><td>
|
|
Array size:
|
|
MONO_PARAM_POINTER_SIZE
|
|
<ul>
|
|
<li>MONO_PARAM_POINTER_PARAM
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<td>Param</td><td>MONO_TABLE_PARAM</td><td>
|
|
Array size: MONO_PARAM_SIZE
|
|
<ul>
|
|
<li>MONO_PARAM_FLAGS
|
|
<li>MONO_PARAM_SEQUENCE
|
|
<li>MONO_PARAM_NAME
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>PropertyMap</td><td>MONO_TABLE_PROPERTYMAP</td><td>
|
|
Array size:
|
|
MONO_PROPERTY_MAP_SIZE
|
|
<ul>
|
|
<li>MONO_PROPERTY_MAP_PARENT
|
|
<li>MONO_PROPERTY_MAP_PROPERTY_LIST
|
|
</li></li></ul>
|
|
</td>
|
|
|
|
|
|
<td>PropertyPtr</td><td>MONO_TABLE_PROPERTY_POINTER</td><td>Array
|
|
size: MONO_PROPERTY_POINTER_SIZE
|
|
<ul>
|
|
<li>MONO_PROPERTY_POINTER_PROPERTY
|
|
</li></ul>
|
|
</td>
|
|
|
|
|
|
<td>Property</td><td>MONO_TABLE_PROPERTY</td><td>
|
|
Array size:
|
|
MONO_PROPERTY_SIZE
|
|
<ul>
|
|
<li>MONO_PROPERTY_FLAGS
|
|
<li>MONO_PROPERTY_NAME
|
|
<li>MONO_PROPERTY_TYPE
|
|
</li></li></li></ul>
|
|
</td>
|
|
|
|
<tr>
|
|
<td>StandaloneSig</td><td>MONO_TABLE_STANDALONESIG</td><td>
|
|
Array size:
|
|
<li>MONO_STAND_ALONE_SIGNATURE_SIZE
|
|
<ul>
|
|
<li>MONO_STAND_ALONE_SIGNATURE
|
|
</li></ul>
|
|
</li></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>TypeDef</td><td>MONO_TABLE_TYPEDEF</td><td>
|
|
Array size:
|
|
MONO_TYPEDEF_SIZE
|
|
<ul>
|
|
<li>MONO_TYPEDEF_FLAGS
|
|
<li>MONO_TYPEDEF_NAME
|
|
<li>MONO_TYPEDEF_NAMESPACE
|
|
<li>MONO_TYPEDEF_EXTENDS
|
|
<li>MONO_TYPEDEF_FIELD_LIST
|
|
<li>MONO_TYPEDEF_METHOD_LIST
|
|
</li></li></li></li></li></li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>TypeSpec</td><td>MONO_TABLE_TYPESPEC</td><td>
|
|
Array size:
|
|
MONO_TYPESPEC_SIZE
|
|
<ul>
|
|
<li>MONO_TYPESPEC_SIGNATURE
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</center>
|
|
|
|
<p />Each table can contain zero or more rows, you must call the
|
|
<a href="#api:mono_metadata_table_rows">mono_metadata_table_rows</a>
|
|
to obtain the number of rows in a table, and then you can
|
|
extract individual row values by using
|
|
the <a href="#api:mono_metadata_decode_row">mono_metadata_decode_row</a>
|
|
or
|
|
the <a href="#api:mono_metadata_decode_row_col">mono_metadata_decode_row_col</a>.
|
|
When decoding rows you must provide an guint32 array large
|
|
enough to hold as many columns as the table contains.
|
|
|
|
<p />The metadata tables are stored in the MonoImage, you obtain
|
|
a pointer to the MonoTableInfo by calling
|
|
the <a href="#api:mono_image_get_table_info">mono_image_get_table_info</a>
|
|
and then you can scan those tables, for example:
|
|
|
|
<pre class="prettyprint">
|
|
/*
|
|
* Dumps a few fields from the AssemblyRef table
|
|
*/
|
|
void DumpAssemblyRefs (MonoImage *image)
|
|
{
|
|
/* Get a pointer to the AssemblyRef metadata table */
|
|
MonoTableInfo *t = mono_image_get_table_info (image, MONO_TABLE_ASSEMBLYREF);
|
|
|
|
/* Fetch the number of rows available in the table */
|
|
int rows = mono_table_info_get_rows (t);
|
|
int i;
|
|
|
|
/* For each row, print some of its values */
|
|
for (i = 0; i < rows; i++){
|
|
/* Space where we extract one row from the metadata table */
|
|
guint32 cols [MONO_ASSEMBLYREF_SIZE];
|
|
|
|
/* Extract the row into the array cols */
|
|
mono_metadata_decode_row (t, i, cols, MONO_ASSEMBLYREF_SIZE);
|
|
|
|
fprintf (output, "%d: Version=%d.%d.%d.%d\n\tName=%s\n", i + 1,
|
|
cols [MONO_ASSEMBLYREF_MAJOR_VERSION],
|
|
cols [MONO_ASSEMBLYREF_MINOR_VERSION],
|
|
cols [MONO_ASSEMBLYREF_BUILD_NUMBER],
|
|
cols [MONO_ASSEMBLYREF_REV_NUMBER],
|
|
mono_metadata_string_heap (image, cols [MONO_ASSEMBLYREF_NAME]));
|
|
}
|
|
}
|
|
</pre>
|
|
|
|
<p />The above program shows the following output when ran on
|
|
the C# compiler:
|
|
|
|
<pre>
|
|
1: Version=1.0.5000.0
|
|
Name=mscorlib
|
|
2: Version=1.0.5000.0
|
|
Name=System
|
|
3: Version=1.0.5000.0
|
|
Name=System.Xml
|
|
</pre>
|
|
|
|
<p />
|
|
|
|
<h3>Metadata Tables API</h3>
|
|
|
|
<p />These are the APIs for dealing with tables:
|
|
|
|
</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_metadata_decode_row_col"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_row_col</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_metadata_decode_row_col (const MonoTableInfo *t, int idx, guint col)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>t</i></td><td> table to extract information from.</td></tr><tr><td><i>idx</i></td><td> index for row in table.</td></tr><tr><td><i>col</i></td><td> column in the row.</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
This function returns the value of column <i>col</i> from the <i>idx</i>
|
|
row in the table <i>t</i> .</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_decode_row"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_row</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_metadata_decode_row (const MonoTableInfo *t, int idx, guint32 *res, int res_size)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>t</i></td><td> table to extract information from.</td></tr><tr><td><i>idx</i></td><td> index in table.</td></tr><tr><td><i>res</i></td><td> array of <i>res_size</i> cols to store the results in</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
This decompresses the metadata element <i>idx</i> in table <i>t</i>
|
|
into the <code>guint32</code> <i>res</i> array that has <i>res_size</i> elements</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_compute_size"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_compute_size</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_metadata_compute_size (MonoImage *meta, int tableindex, guint32 *result_bitfield)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>tableindex</i></td><td> metadata table number</td></tr><tr><td><i>result_bitfield</i></td><td> pointer to <code>guint32</code> where to store additional info</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
<code>mono_metadata_compute_size</code> computes the length in bytes of a single
|
|
row in a metadata table. The size of each column is encoded in the
|
|
<i>result_bitfield</i> return value along with the number of columns in the table.
|
|
the resulting bitfield should be handed to the <code>mono_metadata_table_size</code>
|
|
and <code>mono_metadata_table_count</code> macros.
|
|
This is a Mono runtime internal only function.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_custom_attrs_from_index"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_custom_attrs_from_index</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_metadata_custom_attrs_from_index (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> token representing the parent</td></tr><tr><td><i>returns</i></td><td> the 1-based index into the <code>CustomAttribute</code> table of the first </td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
attribute which belongs to the metadata object described by <i>index</i>.
|
|
Returns 0 if no such attribute is found.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_decode_signed_value"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_signed_value</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">gint32
|
|
mono_metadata_decode_signed_value (const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>ptr</i></td><td> pointer to decode from</td></tr><tr><td><i>rptr</i></td><td> the new position of the pointer</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the decoded value
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
This routine decompresses 32-bit signed values
|
|
(not specified in the spec)
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_decode_value"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_value</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_metadata_decode_value (const char *_ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>ptr</i></td><td> pointer to decode from</td></tr><tr><td><i>rptr</i></td><td> the new position of the pointer</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the decoded value
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
This routine decompresses 32-bit values as specified in the "Blob and
|
|
Signature" section (23.2)
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_encode_value"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_encode_value</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_metadata_encode_value</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
|
|
<h2>Metadata access API</h2>
|
|
|
|
<p />This is the low-level API for accessing the metadata
|
|
images.
|
|
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_pe_file_open"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_pe_file_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_pe_file_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. if
|
|
|
|
<code>NULL</code>, then check the value of <i>status</i> for details on the error.
|
|
This variant for <code>mono_image_open</code> DOES NOT SET UP CLI METADATA.
|
|
It's just a PE file loader, used for <code>FileVersionInfo</code>. It also does
|
|
not use the image cache.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_events_from_typedef"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_events_from_typedef</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_metadata_events_from_typedef (MonoImage *meta, guint32 index, guint *end_idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> 0-based index (in the <code>TypeDef</code> table) describing a type</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 0-based index in the <code>Event</code> table for the events in the
|
|
|
|
type. The last event that belongs to the type (plus 1) is stored
|
|
in the <i>end_idx</i> pointer.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_decode_table_row"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_table_row</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_metadata_decode_table_row (MonoImage *image, int table, int idx, guint32 *res, int res_size)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Same as <code>mono_metadata_decode_row</code>, but takes an <i>image</i> + <i>table</i> ID pair, and takes
|
|
uncompressed metadata into account, so it should be used to access the
|
|
<code>Method</code>, <code>Field</code>, <code>Param</code> and <code>Event</code> tables when the access is made from metadata, i.e.
|
|
<i>idx</i> is retrieved from a metadata table, like <code>MONO_TYPEDEF_FIELD_LIST</code>.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_decode_table_row_col"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_decode_table_row_col</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_metadata_decode_table_row_col (MonoImage *image, int table, int idx, guint col)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Same as <code>mono_metadata_decode_row_col</code>, but takes an <i>image</i> + <i>table</i> ID pair, and takes
|
|
uncompressed metadata into account, so it should be used to access the
|
|
<code>Method</code>, <code>Field</code>, <code>Param</code> and <code>Event</code> tables.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_field_info"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_field_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">void
|
|
mono_metadata_field_info (MonoImage *meta, guint32 index, guint32 *offset, guint32 *rva,
|
|
MonoMarshalSpec **marshal_spec)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> the Image the field is defined in</td></tr><tr><td><i>index</i></td><td> the index in the field table representing the field</td></tr><tr><td><i>offset</i></td><td> a pointer to an integer where to store the offset that may have been specified for the field in a FieldLayout table</td></tr><tr><td><i>rva</i></td><td> a pointer to the RVA of the field data in the image that may have been defined in a <code>FieldRVA</code> table</td></tr><tr><td><i>marshal_spec</i></td><td> a pointer to the marshal spec that may have been defined for the field in a <code>FieldMarshal</code> table.</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Gather info for field <i>index</i> that may have been defined in the <code>FieldLayout</code>,
|
|
<code>FieldRVA</code> and <code>FieldMarshal</code> tables.
|
|
Either of <i>offset</i>, <i>rva</i> and <i>marshal_spec</i> can be <code>NULL</code> if you're not interested
|
|
in the data.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_free_array"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_free_array</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_metadata_free_array (MonoArrayType *array)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>array</i></td><td> array description</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Frees the array description returned from <code>mono_metadata_parse_array</code>.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_free_marshal_spec"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_free_marshal_spec</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_metadata_free_marshal_spec (MonoMarshalSpec *spec)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_free_mh"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_free_mh</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_metadata_free_mh (MonoMethodHeader *mh)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>mh</i></td><td> a method header</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Free the memory allocated for the method header.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_free_type"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_free_type</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_metadata_free_type (MonoType *type)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>type</i></td><td> type to free</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Free the memory allocated for type <i>type</i> which is allocated on the heap.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_get_constant_index"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_get_constant_index</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_metadata_get_constant_index (MonoImage *meta, guint32 token, guint32 hint)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> the Image the field is defined in</td></tr><tr><td><i>index</i></td><td> the token that may have a row defined in the constants table</td></tr><tr><td><i>hint</i></td><td> possible position for the row</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the index into the <code>Constants</code> table or 0 if not found.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
<i>token</i> must be a <code>FieldDef</code>, <code>ParamDef</code> or <code>PropertyDef</code> token.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_get_marshal_info"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_get_marshal_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 char*
|
|
mono_metadata_get_marshal_info (MonoImage *meta, guint32 idx, gboolean is_field)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_implmap_from_method"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_implmap_from_method</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_metadata_implmap_from_method (MonoImage *meta, guint32 method_idx)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_interfaces_from_typedef"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_interfaces_from_typedef</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">MonoClass*
|
|
mono_metadata_interfaces_from_typedef (MonoImage *meta, guint32 index, guint *count)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> typedef token</td></tr><tr><td><i>count</i></td><td> Out parameter used to store the number of interfaces</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the interface array on success, <code>NULL</code> on failure.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
The array of interfaces that the <i>index</i> typedef token implements is returned in
|
|
<i>interfaces</i>. The number of elements in the array is returned in <i>count</i>. The returned
|
|
array is allocated with <code>g_malloc</code> and the caller must free it.
|
|
<p />
|
|
LOCKING: Acquires the loader lock .
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_locate"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_locate</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_metadata_locate (MonoImage *meta, int table, int idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>table</i></td><td> table code.</td></tr><tr><td><i>idx</i></td><td> index of element to retrieve from <i>table</i>.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a pointer to the <i>idx</i> element in the metadata table
|
|
|
|
whose code is <i>table</i>.</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_locate_token"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_locate_token</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_metadata_locate_token (MonoImage *meta, guint32 token)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>token</i></td><td> metadata token</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a pointer to the data in the metadata represented by the
|
|
|
|
token <i>token</i> .</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_methods_from_event"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_methods_from_event</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_metadata_methods_from_event (MonoImage *meta, guint32 index, guint *end_idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> 0-based index (in the <code>Event</code> table) describing a event</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 0-based index in the <code>MethodDef</code> table for the methods in the
|
|
|
|
event. The last method that belongs to the event (plus 1) is stored
|
|
in the <i>end_idx</i> pointer.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_methods_from_property"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_methods_from_property</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_metadata_methods_from_property (MonoImage *meta, guint32 index, guint *end_idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> 0-based index (in the <code>PropertyDef</code> table) describing a property</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 0-based index in the <code>MethodDef</code> table for the methods in the
|
|
|
|
property. The last method that belongs to the property (plus 1) is stored
|
|
in the <i>end_idx</i> pointer.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_nested_in_typedef"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_nested_in_typedef</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_metadata_nested_in_typedef (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> typedef token</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 1-based index into the TypeDef table of the type
|
|
|
|
where the type described by <i>index</i> is nested.
|
|
Returns 0 if <i>index</i> describes a non-nested type.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_nesting_typedef"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_nesting_typedef</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_metadata_nesting_typedef (MonoImage *meta, guint32 index, guint32 start_index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> typedef token</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 1-based index into the <code>TypeDef</code> table of the first type
|
|
|
|
that is nested inside the type described by <i>index</i>. The search starts at
|
|
<i>start_index</i>. Returns 0 if no such type is found.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_packing_from_typedef"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_packing_from_typedef</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_metadata_packing_from_typedef (MonoImage *meta, guint32 index, guint32 *packing, guint32 *size)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> token representing a type</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the info stored in the <code>ClassLayout</code> table for the given typedef token
|
|
|
|
into the <i>packing</i> and <i>size</i> pointers.
|
|
Returns 0 if the info is not found.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_properties_from_typedef"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_properties_from_typedef</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_metadata_properties_from_typedef (MonoImage *meta, guint32 index, guint *end_idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> 0-based index (in the <code>TypeDef</code> table) describing a type</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 0-based index in the <code>Property</code> table for the properties in the
|
|
|
|
type. The last property that belongs to the type (plus 1) is stored
|
|
in the <i>end_idx</i> pointer.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_token_from_dor"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_token_from_dor</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_metadata_token_from_dor (guint32 dor_index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>dor_token</i></td><td> A <code>TypeDefOrRef</code> coded index</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> an expanded token
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
<i>dor_token</i> is a <code>TypeDefOrRef</code> coded index: it contains either
|
|
a <code>TypeDef</code>, <code>TypeRef</code> or <code>TypeSpec</code> in the lower bits, and the upper
|
|
bits contain an index into the table.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_translate_token_index"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_translate_token_index</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_metadata_translate_token_index (MonoImage *image, int table, guint32 idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
Translates the given 1-based index into the <code>Method</code>, <code>Field</code>, <code>Event</code>, or <code>Param</code> tables
|
|
using the <code>*Ptr</code> tables in uncompressed metadata, if they are available.
|
|
<p />
|
|
FIXME: The caller is not forced to call this function, which is error-prone, since
|
|
forgetting to call it would only show up as a bug on uncompressed metadata.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_typedef_from_field"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_typedef_from_field</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_metadata_typedef_from_field (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> FieldDef token</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 1-based index into the <code>TypeDef</code> table of the type that
|
|
|
|
declared the field described by <i>index</i>, or 0 if not found.</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_typedef_from_method"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_typedef_from_method</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_metadata_typedef_from_method (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> <code>MethodDef</code> token</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 1-based index into the <code>TypeDef</code> table of the type that
|
|
|
|
declared the method described by <i>index</i>. 0 if not found.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_type_equal"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_type_equal</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_metadata_type_equal (MonoType *t1, MonoType *t2)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_type_hash"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_type_hash</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">guint
|
|
mono_metadata_type_hash (MonoType *t1)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>t1</i></td><td> a type</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
Computes a hash value for <i>t1</i> to be used in <code>GHashTable</code>.
|
|
The returned hash is guaranteed to be the same across executions.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_declsec_from_index"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_declsec_from_index</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_metadata_declsec_from_index (MonoImage *meta, guint32 index)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>meta</i></td><td> metadata context</td></tr><tr><td><i>index</i></td><td> token representing the parent</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 0-based index into the <code>DeclarativeSecurity</code> table of the first
|
|
|
|
attribute which belongs to the metadata object described by <i>index</i>.
|
|
Returns <code>-1</code> if no such attribute is found.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_free_method_signature"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_free_method_signature</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_metadata_free_method_signature (MonoMethodSignature *sig)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>sig</i></td><td> signature to destroy</td></tr></tbody></table> <div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Free the memory allocated in the signature <i>sig</i>.
|
|
This method needs to be robust and work also on partially-built
|
|
signatures, so it does extra checks.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
|
|
<h3>Retrieving Objects from Tokens</h3>
|
|
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_array"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_array</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">MonoArrayType*
|
|
mono_metadata_parse_array (MonoImage *m, const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_custom_mod"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_custom_mod</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_metadata_parse_custom_mod (MonoImage *m, MonoCustomMod *dest, const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>m</i></td><td> a metadata context.</td></tr><tr><td><i>dest</i></td><td> storage where the info about the custom modifier is stored (may be <code>NULL</code>)</td></tr><tr><td><i>ptr</i></td><td> a pointer to (possibly) the start of a custom modifier list</td></tr><tr><td><i>rptr</i></td><td> pointer updated to match the end of the decoded stream</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> <code>TRUE</code> if a custom modifier was found, <code>FALSE</code> if not.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Checks if <i>ptr</i> points to a type custom modifier compressed representation.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_field_type"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_field_type</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">MonoType*
|
|
mono_metadata_parse_field_type (MonoImage *m, short field_flags, const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>m</i></td><td> metadata context to extract information from</td></tr><tr><td><i>ptr</i></td><td> pointer to the field signature</td></tr><tr><td><i>rptr</i></td><td> pointer updated to match the end of the decoded stream</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> The <code>MonoType</code> that was extracted from <i>ptr</i> .
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Parses the field signature, and returns the type information for it.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_marshal_spec"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_marshal_spec</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">MonoMarshalSpec*
|
|
mono_metadata_parse_marshal_spec (MonoImage *image, const char *ptr)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_method_signature"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_method_signature</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">MonoMethodSignature*
|
|
mono_metadata_parse_method_signature (MonoImage *m, int def, const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>m</i></td><td> metadata context</td></tr><tr><td><i>def</i></td><td> the <code>MethodDef</code> index or 0 for <code>Ref</code> signatures.</td></tr><tr><td><i>ptr</i></td><td> pointer to the signature metadata representation</td></tr><tr><td><i>rptr</i></td><td> pointer updated to match the end of the decoded stream</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a <code>MonoMethodSignature</code> describing the signature.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Decode a method signature stored at <i>ptr</i>.
|
|
This is a Mono runtime internal function.
|
|
<p />
|
|
LOCKING: Assumes the loader lock is held.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_mh"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_mh</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">MonoMethodHeader*
|
|
mono_metadata_parse_mh (MonoImage *m, const char *ptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>generic_context</i></td><td> generics context</td></tr><tr><td><i>ptr</i></td><td> pointer to the method header.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a transient <code>MonoMethodHeader</code> allocated from the heap.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Decode the method header at <i>ptr</i>, including pointer to the IL code,
|
|
info about local variables and optional exception tables.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_param"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_param</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">MonoType*
|
|
mono_metadata_parse_param (MonoImage *m, const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>m</i></td><td> metadata context to extract information from</td></tr><tr><td><i>ptr</i></td><td> pointer to the param signature</td></tr><tr><td><i>rptr</i></td><td> pointer updated to match the end of the decoded stream</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> The <code>MonoType</code> that was extracted from <i>ptr</i> .
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Parses the param signature, and returns the type information for it.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_signature"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_signature</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">MonoMethodSignature*
|
|
mono_metadata_parse_signature (MonoImage *image, guint32 token)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>image</i></td><td> metadata context</td></tr><tr><td><i>token</i></td><td> metadata token</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a <code>MonoMethodSignature</code> describing the signature.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Decode a method signature stored in the <code>StandAloneSig</code> table
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_typedef_or_ref"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_typedef_or_ref</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_metadata_parse_typedef_or_ref (MonoImage *m, const char *ptr, const char **rptr)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>m</i></td><td> a metadata context.</td></tr><tr><td><i>ptr</i></td><td> a pointer to an encoded TypedefOrRef in <i>m</i></td></tr><tr><td><i>rptr</i></td><td> pointer updated to match the end of the decoded stream</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a token valid in the <i>m</i> metadata decoded from
|
|
|
|
the compressed representation.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_parse_type"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_type</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">static MonoType*
|
|
mono_metadata_parse_type_internal (MonoImage *m, MonoGenericContainer *container,
|
|
short opt_attrs, gboolean transient, const char *ptr, const char **rptr, MonoError *error)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>m</i></td><td> metadata context</td></tr><tr><td><i>mode</i></td><td> kind of type that may be found at <i>ptr</i></td></tr><tr><td><i>opt_attrs</i></td><td> optional attributes to store in the returned type</td></tr><tr><td><i>ptr</i></td><td> pointer to the type representation</td></tr><tr><td><i>rptr</i></td><td> pointer updated to match the end of the decoded stream</td></tr><tr><td><i>transient</i></td><td> whenever to allocate the result from the heap or from a mempool</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a <code>MonoType</code> structure representing the decoded type.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Decode a compressed type description found at <i>ptr</i> in <i>m</i> .
|
|
<i>mode</i> can be one of <code>MONO_PARSE_MOD_TYPE</code>, <code>MONO_PARSE_PARAM</code>, <code>MONO_PARSE_RET</code>,
|
|
<code>MONO_PARSE_FIELD</code>, <code>MONO_PARSE_LOCAL</code>, <code>MONO_PARSE_TYPE</code>.
|
|
This function can be used to decode type descriptions in method signatures,
|
|
field signatures, locals signatures etc.
|
|
<p />
|
|
To parse a generic type, <code>generic_container</code> points to the current class'es
|
|
(the <code>generic_container</code> field in the <code>MonoClass</code>) or the current generic method's
|
|
(stored in <code>image->property_hash</code>) generic container.
|
|
When we encounter a <code>MONO_TYPE_VAR</code> or <code>MONO_TYPE_MVAR</code>, it's looked up in
|
|
this <code>MonoGenericContainer</code>.
|
|
<p />
|
|
LOCKING: Acquires the loader lock.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
|
|
<h2>Generics Support</h2>
|
|
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_generic_class_is_valuetype"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_generic_class_is_valuetype</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_metadata_generic_class_is_valuetype (MonoGenericClass *gclass)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
|
|
<h2>Tokens</h2>
|
|
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_ldtoken"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_ldtoken</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_ldtoken (MonoImage *image, guint32 token, MonoClass **handle_class,
|
|
MonoGenericContext *context)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_ldstr"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_ldstr</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">MonoString*
|
|
mono_ldstr (MonoDomain *domain, MonoImage *image, guint32 idx)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>domain</i></td><td> the domain where the string will be used.</td></tr><tr><td><i>image</i></td><td> a metadata context</td></tr><tr><td><i>idx</i></td><td> index into the user string table.</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a loaded string from the <i>image</i> / <i>idx</i> combination.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
Implementation for the <code>ldstr</code> opcode.</div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_exception_from_token"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_exception_from_token</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">MonoException*
|
|
mono_exception_from_token (MonoImage *image, guint32 token)
|
|
|
|
</div>
|
|
<p />
|
|
<div class="mapi-section">Parameters</div>
|
|
<table class="mapi-parameters"><tbody><tr><td><i>image</i></td><td> the Mono image where to look for the class</td></tr><tr><td><i>token</i></td><td> The type token of the class</td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the initialized exception instance.
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div>
|
|
<p />
|
|
Creates an exception of the type given by <i>token</i>.
|
|
<p /></div>
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
|
|
<h2>OpCodes</h2>
|
|
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_opcode_name"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_opcode_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_opcode_name (int opcode)
|
|
|
|
</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|