e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
1949 lines
65 KiB
HTML
1949 lines
65 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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-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> metadata context</td></td></tr><tr><td><i>index</i><td> index into the guid heap.</td></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 class="mapi-section">Description</div>
|
|
<div> <p /> </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> metadata context</td></td></tr><tr><td><i>index</i><td> index into the string heap.</td></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 class="mapi-section">Description</div>
|
|
<div> <p /> </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> metadata context</td></td></tr><tr><td><i>index</i><td> index into the blob.</td></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 class="mapi-section">Description</div>
|
|
<div> <p /> </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> metadata context</td></td></tr><tr><td><i>index</i><td> index into the user string heap.</td></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>US</code>").
|
|
</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div> <p /> </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> pointer to a blob object</td></td></tr><tr><td><i>rptr</i><td> the new position of the pointer</td></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 23.1.4 (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">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_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> table to extract information from.</td></td></tr><tr><td><i>idx</i><td> index for row in table.</td></td></tr><tr><td><i>col</i><td> column in the row.</td></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> table to extract information from.</td></td></tr><tr><td><i>idx</i><td> index in table.</td></td></tr><tr><td><i>res</i><td> array of <i>res_size</i> cols to store the results in</td></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 guint32 <i>res</i> array that has res_size 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">mono_metadata_compute_size</div>
|
|
<p />
|
|
</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">mono_metadata_custom_attrs_from_index</div>
|
|
<p />
|
|
</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> pointer to decode from</td></td></tr><tr><td><i>rptr</i><td> the new position of the pointer</td></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> pointer to decode from</td></td></tr><tr><td><i>rptr</i><td> the new position of the pointer</td></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 (22.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> 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. if
|
|
|
|
<code>NULL</code>, then check the value of <i>status</i> for details on the error.
|
|
This variant for mono_image_open DOES NOT SET UP CLI METADATA.
|
|
It's just a PE file loader, used for FileVersionInfo. It also does
|
|
not use the image cache.</div>
|
|
<div class="mapi-section">Description</div>
|
|
<div> <p /> </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">mono_metadata_events_from_typedef</div>
|
|
<p />
|
|
</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 mono_metadata_decode_row, but takes an IMAGE+TABLE ID pair, and takes
|
|
uncompressed metadata into account, so it should be used to access the
|
|
Method, Field, Param and Event tables when the access is made from metadata, i.e.
|
|
IDX is retrieved from a metadata table, like MONO_TYPEDEF_FIELD_LIST.</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 mono_metadata_decode_row_col, but takes an IMAGE+TABLE ID pair, and takes
|
|
uncompressed metadata into account, so it should be used to access the
|
|
Method, Field, Param and Event 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">mono_metadata_field_info</div>
|
|
<p />
|
|
</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">mono_metadata_free_array</div>
|
|
<p />
|
|
</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">mono_metadata_free_marshal_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">mono_metadata_free_mh</div>
|
|
<p />
|
|
</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">mono_metadata_free_type</div>
|
|
<p />
|
|
</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">mono_metadata_get_constant_index</div>
|
|
<p />
|
|
</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">mono_metadata_get_marshal_info</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">mono_metadata_implmap_from_method</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">mono_metadata_interfaces_from_typedef</div>
|
|
<p />
|
|
</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> metadata context</td></td></tr><tr><td><i>table</i><td> table code.</td></td></tr><tr><td><i>idx</i><td> index of element to retrieve from <i>table</i>.</td></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> metadata context</td></td></tr><tr><td><i>token</i><td> metadata token</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> a pointer to the data in the metadata represented by the
|
|
|
|
token <code>token</code>.</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">mono_metadata_methods_from_event</div>
|
|
<p />
|
|
</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">mono_metadata_methods_from_property</div>
|
|
<p />
|
|
</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">mono_metadata_nested_in_typedef</div>
|
|
<p />
|
|
</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">mono_metadata_nesting_typedef</div>
|
|
<p />
|
|
</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">mono_metadata_packing_from_typedef</div>
|
|
<p />
|
|
</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">mono_metadata_properties_from_typedef</div>
|
|
<p />
|
|
</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">mono_metadata_token_from_dor</div>
|
|
<p />
|
|
</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">mono_metadata_translate_token_index</div>
|
|
<p />
|
|
</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> metadata context</td></td></tr><tr><td><i>index</i><td> FieldDef token</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> the 1-based index into the TypeDef 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">mono_metadata_typedef_from_method</div>
|
|
<p />
|
|
</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">mono_metadata_type_equal</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">mono_metadata_type_hash</div>
|
|
<p />
|
|
</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">mono_metadata_declsec_from_index</div>
|
|
<p />
|
|
</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">mono_metadata_free_method_signature</div>
|
|
<p />
|
|
</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">mono_metadata_parse_array</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">mono_metadata_parse_custom_mod</div>
|
|
<p />
|
|
</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> metadata context to extract information from</td></td></tr><tr><td><i>ptr</i><td> pointer to the field signature</td></td></tr><tr><td><i>rptr</i><td> pointer updated to match the end of the decoded stream</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> The MonoType 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">mono_metadata_parse_marshal_spec</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">mono_metadata_parse_method_signature</div>
|
|
<p />
|
|
</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">mono_metadata_parse_mh</div>
|
|
<p />
|
|
</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> metadata context to extract information from</td></td></tr><tr><td><i>ptr</i><td> pointer to the param signature</td></td></tr><tr><td><i>rptr</i><td> pointer updated to match the end of the decoded stream</td></td></tr></tbody></table> <div class="mapi-section">Return value</div>
|
|
<div> The MonoType 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_ret_type"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_parse_ret_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">mono_metadata_parse_ret_type</div>
|
|
<p />
|
|
</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">mono_metadata_parse_signature</div>
|
|
<p />
|
|
</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">mono_metadata_parse_typedef_or_ref</div>
|
|
<p />
|
|
</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> metadata context</td></td></tr><tr><td><i>mode</i><td> king of type that may be found at <i>ptr</i></td></td></tr><tr><td><i>opt_attrs</i><td> optional attributes to store in the returned type</td></td></tr><tr><td><i>ptr</i><td> pointer to the type representation</td></td></tr><tr><td><i>rptr</i><td> pointer updated to match the end of the decoded stream</td></td></tr><tr><td><i>transient</i><td> whenever to allocate the result from the heap or from a mempool</td></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 MONO_PARSE_MOD_TYPE, MONO_PARSE_PARAM, MONO_PARSE_RET,
|
|
MONO_PARSE_FIELD, MONO_PARSE_LOCAL, MONO_PARSE_TYPE.
|
|
This function can be used to decode type descriptions in method signatures,
|
|
field signatures, locals signatures etc.
|
|
<p />
|
|
To parse a generic type, `generic_container' points to the current class'es
|
|
(the `generic_container' field in the MonoClass) or the current generic method's
|
|
(stored in image->property_hash) generic container.
|
|
When we encounter any MONO_TYPE_VAR or MONO_TYPE_MVAR's, they're looked up in
|
|
this MonoGenericContainer.
|
|
<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_equal"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_generic_class_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">mono_metadata_generic_class_equal</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div> <!-- class=mapi -->
|
|
|
|
<a name="api:mono_metadata_generic_class_hash"></a>
|
|
<div class="mapi">
|
|
<div class="mapi-entry "><code>mono_metadata_generic_class_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">mono_metadata_generic_class_hash</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</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">mono_metadata_generic_class_is_valuetype</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">mono_ldtoken</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> the domain where the string will be used.</td></td></tr><tr><td><i>image</i><td> a metadata context</td></td></tr><tr><td><i>idx</i><td> index into the user string table.</td></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> <p />
|
|
Implementation for the ldstr 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> the Mono image where to look for the class</td></td></tr><tr><td><i>token</i><td> The type token of the class</td></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">mono_opcode_name</div>
|
|
<p />
|
|
</div><!--mapi-description -->
|
|
</div><!--height container -->
|
|
</div>
|
|
</div></body>
|
|
</html>
|