diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index b7e7022d42..c65a1f2734 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -03ca165ce83cc7c3a8c992c897eb02312b51e7b8 \ No newline at end of file +fd0ff24a20da7243885930ae0e345f5f31e76b70 \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index 48ed412c52..1ae7f06e08 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -5d9961ae1eab15d979b37b7a90e6507b7a79f51b \ No newline at end of file +a7f2080b235146bb5464ae6da7d9ff2101cbecf7 \ No newline at end of file diff --git a/docs/deploy/api-style.css b/docs/deploy/api-style.css deleted file mode 100644 index 910ac49e55..0000000000 --- a/docs/deploy/api-style.css +++ /dev/null @@ -1,40 +0,0 @@ - h3 { - font-size: 18px; - padding-bottom: 4pt; - border-bottom: 2px solid #dddddd; - } - - .api { - border: 1px solid; - padding: 10pt; - margin: 10pt; - } - - .api-entry { - border-bottom: none; - font-size: 18px; - } - - .prototype { - border: 1px solid; - background-color: #f2f2f2; - padding: 5pt; - margin-top: 5pt; - margin-bottom: 5pt; - } - - .header { - border: 1px solid; - padding: 0 0 5pt 5pt; - margin: 10pt; - white-space: pre; - font-family: monospace; - } - - .code { - border: 1px solid; - padding: 0 0 5pt 5pt; - margin: 10pt; - white-space: pre; - font-family: monospace; - } diff --git a/docs/deploy/mono-api-assembly.html b/docs/deploy/mono-api-assembly.html deleted file mode 100644 index 78d66f4f58..0000000000 --- a/docs/deploy/mono-api-assembly.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - mono-api-assembly.html - - - -

Assemblies

- -

Synopsis

- -
-#include <metadata/assembly.h> - -typedef struct _MonoImage MonoImage; -typedef struct _MonoAssembly MonoAssembly; - -MonoAssembly* mono_assembly_open (const char *filename, - MonoImageOpenStatus *status); -void mono_assembly_close (MonoAssembly *assembly); -MonoAssembly* mono_assembly_load (MonoAssemblyName *aname, - const char *basedir, - MonoImageOpenStatus *status); -MonoAssembly* mono_assembly_load_full (MonoAssemblyName *aname, - const char *basedir, - MonoImageOpenStatus *status, - gboolean refonly); -MonoAssembly* mono_assembly_loaded (MonoAssemblyName *aname); - -MonoImage* mono_assembly_get_image (MonoAssembly *assembly); -MonoAssembly* mono_assembly_get_main (void); -G_CONST_RETURN gchar * mono_assembly_getrootdir (void); -void mono_assembly_name_free (MonoAssemblyName *aname); -char* mono_stringify_assembly_name (MonoAssemblyName *aname); -gboolean mono_assembly_names_equal (MonoAssemblyName *l, - MonoAssemblyName *r); - - - - -
- - -

Assembly Loading

- - -
-
mono_assembly_open
- -
MonoAssembly* -mono_assembly_open (const char *filename, MonoImageOpenStatus *status) - -
-

-Parameters -

filename:
Opens the assembly pointed out by this name
status:
where a status code can be returned
-Returns -
a pointer to the MonoAssembly if filename contains a valid - - assembly or NULL on error. Details about the error are stored in the - status variable.
-Remarks -

- mono_assembly_open opens the PE-image pointed by filename, and - loads any external assemblies referenced by it. - - -

-
-
mono_assembly_close
- -
void -mono_assembly_close (MonoAssembly *assembly) - -
-

-Parameters -

assembly:
the assembly to release.
-Remarks -

- This method releases a reference to the assembly. The assembly is - only released when all the outstanding references to it are released. - -

-
-
mono_assembly_load
- -
MonoAssembly* -mono_assembly_load (MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status) - -
-

-Parameters -

aname:
A MonoAssemblyName with the assembly name to load.
basedir:
A directory to look up the assembly at.
status:
a pointer to a MonoImageOpenStatus to return the status of the load operation
-Returns -
the assembly referenced by aname loaded or NULL on error. On error the - - value pointed by status is updated with an error code.
-Remarks -

- Loads the assembly referenced by aname, if the value of basedir is not NULL, it - attempts to load the assembly from that directory before probing the standard locations. - - -

-
-
mono_assembly_load_full
- -
MonoAssembly* -mono_assembly_load_full (MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status, gboolean refonly) - -
-

-Parameters -

aname:
A MonoAssemblyName with the assembly name to load.
basedir:
A directory to look up the assembly at.
status:
a pointer to a MonoImageOpenStatus to return the status of the load operation
refonly:
Whether this assembly is being opened in "reflection-only" mode.
-Returns -
the assembly referenced by aname loaded or NULL on error. On error the - - value pointed by status is updated with an error code.
-Remarks -

- Loads the assembly referenced by aname, if the value of basedir is not NULL, it - attempts to load the assembly from that directory before probing the standard locations. - - If the assembly is being opened in reflection-only mode (refonly set to TRUE) then no - assembly binding takes place. - - -

-
-
mono_assembly_loaded
- -
MonoAssembly* -mono_assembly_loaded (MonoAssemblyName *aname) - -
-

-Parameters -

aname:
an assembly to look for.
-Returns -
NULL If the given aname assembly has not been loaded, or a pointer to - - a MonoAssembly that matches the MonoAssemblyName specified.
- -
-
-
mono_assembly_get_object
- -
Prototype: mono_assembly_get_object
-

- - -

Working with Assemblies

- - -
-
mono_assembly_get_image
- -
MonoImage* -mono_assembly_get_image (MonoAssembly *assembly) - -
-

-Parameters -

assembly:
The assembly to retrieve the image from
-Returns -
the MonoImage associated with this assembly. -
- -
-
-
mono_assembly_get_main
- -
MonoAssembly* -mono_assembly_get_main (void) - -
-

-Returns -

the assembly for the application, the first assembly that is loaded by the VM -
- -
-
-
mono_assembly_getrootdir
- -
G_CONST_RETURN gchar * -mono_assembly_getrootdir (void) - -
-

-Returns -

a string with the directory, this string should not be freed. -
-Remarks -

- - Obtains the root directory used for looking up assemblies. - - - -

Assembly Names

- -

The MonoAssemblyName contains the full identity of an - assembly (name, culture, public key, public key token, - version and any other flags). - -

These unmanaged objects represent the System.Reflection.AssemblyName - managed type. - - -

-
mono_assembly_name_free
- -
void -mono_assembly_name_free (MonoAssemblyName *aname) - -
-

-Parameters -

aname:
assembly name to free
-Remarks -

- - Frees the provided assembly name object. - (it does not frees the object itself, only the name members). - -

-
-
mono_stringify_assembly_name
- -
char* -mono_stringify_assembly_name (MonoAssemblyName *aname) - -
-

-Parameters -

aname:
the assembly name.
-Returns -
a newly allocated string with a string representation of - - the assembly name.
-Remarks -

- Convert aname into its string format. The returned string is dynamically - allocated and should be freed by the caller. - - -

-
-
mono_assembly_names_equal
- -
gboolean -mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r) - -
-

-Parameters -

l:
first assembly
r:
second assembly.
-Returns -
TRUE if both assembly names are equal. -
-Remarks -

- Compares two MonoAssemblyNames and returns whether they are equal. - - This compares the names, the cultures, the release version and their - public tokens. - - - -

Modules

- -

An assembly is made up of one or more modules. - - -

-
mono_module_file_get_object
- -
Prototype: mono_module_file_get_object
-

- -

-
-
mono_module_get_object
- -
Prototype: mono_module_get_object
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-class.html b/docs/deploy/mono-api-class.html deleted file mode 100644 index 8ae3defebf..0000000000 --- a/docs/deploy/mono-api-class.html +++ /dev/null @@ -1,821 +0,0 @@ - - - - mono-api-class.html - - - -

Class Operations

- - -
-
mono_class_array_element_size
- -
gint32 -mono_class_array_element_size (MonoClass *klass) - -
-

-Parameters -

klass:
-Returns -
the number of bytes an element of type klass - - uses when stored into an array.
- -
-
-
mono_class_data_size
- -
gint32 -mono_class_data_size (MonoClass *klass) - -
-

-Parameters -

klass:
a class
-Returns -
the size of the static class data -
-Remarks -

- - -

-
-
mono_class_enum_basetype
- -
MonoType* -mono_class_enum_basetype (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the underlying type representation for an enumeration. -
- -
-
-
mono_class_from_generic_parameter
- -
Prototype: mono_class_from_generic_parameter
-

- -

-
-
mono_class_from_mono_type
- -
Prototype: mono_class_from_mono_type
-

- -

-
-
mono_class_from_name_case
- -
MonoClass* -mono_class_from_name_case (MonoImage *image, const char* name_space, const char *name) - -
-

-Parameters -

image:
The MonoImage where the type is looked up in
name_space:
the type namespace
name:
the type short name.
deprecated:
use the _checked variant
-Remarks -

- Obtains a MonoClass with a given namespace and a given name which - is located in the given MonoImage. The namespace and name - lookups are case insensitive. - -

-
-
mono_class_from_name
- -
MonoClass* -mono_class_from_name (MonoImage *image, const char* name_space, const char *name) - -
-

-Parameters -

image:
The MonoImage where the type is looked up in
name_space:
the type namespace
name:
the type short name.
-Remarks -

- Obtains a MonoClass with a given namespace and a given name which - is located in the given MonoImage. - - To reference nested classes, use the "/" character as a separator. - For example use "Foo/Bar" to reference the class Bar that is nested - inside Foo, like this: "class Foo { class Bar {} }". - -

-
-
mono_class_from_typeref
- -
Prototype: mono_class_from_typeref
-

- -

-
-
mono_class_get_byref_type
- -
MonoType* -mono_class_get_byref_type (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Remarks -

- -

- -

-
-
mono_class_get_element_class
- -
MonoClass* -mono_class_get_element_class (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the element class of an array or an enumeration. -
- -
-
-
mono_class_get_events
- -
MonoEvent* -mono_class_get_events (MonoClass* klass, gpointer *iter) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
a MonoEvent* on each invocation, or NULL when no more are available. -
-Remarks -

- This routine is an iterator routine for retrieving the properties in a class. - - You must pass a gpointer that points to zero and is treated as an opaque handle to - iterate over all of the elements. When no more values are - available, the return value is NULL. - - -

-
-
mono_class_get_event_token
- -
Prototype: mono_class_get_event_token
-

- -

-
-
mono_class_get_field_from_name
- -
MonoClassField* -mono_class_get_field_from_name (MonoClass *klass, const char *name) - -
-

-Parameters -

klass:
the class to lookup the field.
name:
the field name
-Returns -
the MonoClassField pointer of the named field or NULL -
-Remarks -

- Search the class klass and it's parents for a field with the name name. - -

- -

-
-
mono_class_get_field
- -
MonoClassField* -mono_class_get_field (MonoClass *class, guint32 field_token) - -
-

-Parameters -

class:
the class to lookup the field.
field_token:
the field token
-Returns -
A MonoClassField representing the type and offset of - - the field, or a NULL value if the field does not belong to this - class.
- -
-
-
mono_class_get_fields
- -
MonoClassField* -mono_class_get_fields (MonoClass* klass, gpointer *iter) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
a MonoClassField* on each iteration, or NULL when no more fields are available. -
-Remarks -

- This routine is an iterator routine for retrieving the fields in a class. - - You must pass a gpointer that points to zero and is treated as an opaque handle to - iterate over all of the elements. When no more values are - available, the return value is NULL. - - -

-
-
mono_class_get_field_token
- -
guint32 -mono_class_get_field_token (MonoClassField *field) - -
-

-Parameters -

field:
the field we need the token of
-Returns -
the token representing the field in the image it was loaded from. -
-Remarks -

- Get the token of a field. Note that the tokesn is only valid for the image - the field was loaded from. Don't use this function for fields in dynamic types. - -

- -

-
-
mono_class_get_flags
- -
guint32 -mono_class_get_flags (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the flags from the TypeDef table. -
-Remarks -

- The type flags from the TypeDef table from the metadata. - see the TYPE_ATTRIBUTE_* definitions on tabledefs.h for the - different values. - - -

-
-
mono_class_get_full
- -
MonoClass* -mono_class_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *context) - -
-

-Parameters -

image:
the image where the class resides
type_token:
the token for the class
context:
the generic context used to evaluate generic instantiations in
deprecated:
Functions that expose MonoGenericContext are going away in mono 4.0
-Returns -
the MonoClass that represents type_token in image -
- -
-
-
mono_class_get_image
- -
Prototype: mono_class_get_image
-

- -

-
-
mono_class_get_interfaces
- -
MonoClass* -mono_class_get_interfaces (MonoClass* klass, gpointer *iter) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
a Monoclass* on each invocation, or NULL when no more are available. -
-Remarks -

- This routine is an iterator routine for retrieving the interfaces implemented by this class. - - You must pass a gpointer that points to zero and is treated as an opaque handle to - iterate over all of the elements. When no more values are - available, the return value is NULL. - - -

-
-
mono_class_get_method_from_name
- -
MonoMethod* -mono_class_get_method_from_name (MonoClass *klass, const char *name, int param_count) - -
-

-Parameters -

klass:
where to look for the method
name:
name of the method
param_count:
number of parameters. -1 for any number.
-Remarks -

- Obtains a MonoMethod with a given name and number of parameters. - It only works if there are no multiple signatures for any given method name. - -

-
-
mono_class_get_methods
- -
MonoMethod* -mono_class_get_methods (MonoClass* klass, gpointer *iter) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
a MonoMethod on each iteration or NULL when no more methods are available. -
-Remarks -

- This routine is an iterator routine for retrieving the fields in a class. - - You must pass a gpointer that points to zero and is treated as an opaque handle to - iterate over all of the elements. When no more values are - available, the return value is NULL. - - -

-
-
mono_class_get
- -
Prototype: mono_class_get
-

- -

-
-
mono_class_get_name
- -
const char* -mono_class_get_name (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the name of the class. -
- -
-
-
mono_class_get_namespace
- -
const char* -mono_class_get_namespace (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the namespace of the class. -
- -
-
-
mono_class_get_nested_types
- -
MonoClass* -mono_class_get_nested_types (MonoClass* klass, gpointer *iter) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
a Monoclass* on each invocation, or NULL when no more are available. -
-Remarks -

- This routine is an iterator routine for retrieving the nested types of a class. - This works only if klass is non-generic, or a generic type definition. - - You must pass a gpointer that points to zero and is treated as an opaque handle to - iterate over all of the elements. When no more values are - available, the return value is NULL. - - -

-
-
mono_class_get_nesting_type
- -
Prototype: mono_class_get_nesting_type
-

- -

-
-
mono_class_get_parent
- -
MonoClass* -mono_class_get_parent (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the parent class for this class. -
- -
-
-
mono_class_get_properties
- -
MonoProperty* -mono_class_get_properties (MonoClass* klass, gpointer *iter) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
a MonoProperty* on each invocation, or NULL when no more are available. -
-Remarks -

- This routine is an iterator routine for retrieving the properties in a class. - - You must pass a gpointer that points to zero and is treated as an opaque handle to - iterate over all of the elements. When no more values are - available, the return value is NULL. - - -

-
-
mono_class_get_property_from_name
- -
Prototype: mono_class_get_property_from_name
-

- -

-
-
mono_class_get_property_token
- -
Prototype: mono_class_get_property_token
-

- -

-
-
mono_class_get_rank
- -
int -mono_class_get_rank (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the rank for the array (the number of dimensions). -
- -
-
-
mono_class_get_type
- -
MonoType* -mono_class_get_type (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the MonoType from the class. -
-Remarks -

- This method returns the internal Type representation for the class. - - -

-
-
mono_class_inflate_generic_method
- -
Prototype: mono_class_inflate_generic_method
-

- -

-
-
mono_class_inflate_generic_type
- -
Prototype: mono_class_inflate_generic_type
-

- -

-
-
mono_class_init
- -
gboolean -mono_class_init (MonoClass *class) - -
-

-Parameters -

class:
the class to initialize
-Remarks -

- Compute the instance_size, class_size and other infos that cannot be - computed at mono_class_get() time. Also compute vtable_size if possible. - Returns TRUE on success or FALSE if there was a problem in loading - the type (incorrect assemblies, missing assemblies, methods, etc). - - LOCKING: Acquires the loader lock. - -

-
-
mono_class_instance_size
- -
gint32 -mono_class_instance_size (MonoClass *klass) - -
-

-Parameters -

klass:
a class
-Returns -
the size of an object instance -
-Remarks -

- - -

-
-
mono_class_is_assignable_from
- -
gboolean -mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass) - -
-

-Parameters -

klass:
the class to be assigned to
oklass:
the source class
-Returns -
true if an instance of object oklass can be assigned to an - - instance of object klass
- -
-
-
mono_class_is_enum
- -
gboolean -mono_class_is_enum (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
true if the MonoClass represents an enumeration. -
- -
-
-
mono_class_is_subclass_of
- -
gboolean -mono_class_is_subclass_of (MonoClass *klass, MonoClass *klassc, - gboolean check_interfaces) - -
-

-Parameters -

klass:
class to probe if it is a subclass of another one
klassc:
the class we suspect is the base class
check_interfaces:
whether we should perform interface checks
-Remarks -

- This method determines whether klass is a subclass of klassc. - - If the check_interfaces flag is set, then if klassc is an interface - this method return true if the klass implements the interface or - if klass is an interface, if one of its base classes is klass. - - If check_interfaces is false then, then if klass is not an interface - then it returns true if the klass is a subclass of klassc. - - if klass is an interface and klassc is System.Object, then this function - return true. - - -

-
-
mono_class_is_valuetype
- -
gboolean -mono_class_is_valuetype (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
true if the MonoClass represents a ValueType. -
- -
-
-
mono_class_min_align
- -
gint32 -mono_class_min_align (MonoClass *klass) - -
-

-Parameters -

klass:
a class
-Returns -
minimm alignment requirements -
-Remarks -

- - -

-
-
mono_class_num_events
- -
int -mono_class_num_events (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the number of events in the class. -
- -
-
-
mono_class_num_fields
- -
int -mono_class_num_fields (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the number of static and instance fields in the class. -
- -
-
-
mono_class_num_methods
- -
int -mono_class_num_methods (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the number of methods in the class. -
- -
-
-
mono_class_num_properties
- -
int -mono_class_num_properties (MonoClass *klass) - -
-

-Parameters -

klass:
the MonoClass to act on
-Returns -
the number of properties in the class. -
- -
-
-
mono_class_value_size
- -
gint32 -mono_class_value_size (MonoClass *klass, guint32 *align) - -
-

-Parameters -

klass:
a class
-Returns -
the size of a value of kind klass -
-Remarks -

- This function is used for value types, and return the - space and the alignment to store that kind of value object. - - -

-
-
mono_class_vtable
- -
MonoVTable* -mono_class_vtable (MonoDomain *domain, MonoClass *class) - -
-

-Parameters -

domain:
the application domain
class:
the class to initialize
-Remarks -

- VTables are domain specific because we create domain specific code, and - they contain the domain specific static class data. - On failure, NULL is returned, and class->exception_type is set. - -

-
-
mono_class_get_method_from_name_flags
- -
MonoMethod* -mono_class_get_method_from_name_flags (MonoClass *klass, const char *name, int param_count, int flags) - -
-

-Parameters -

klass:
where to look for the method
name_space:
name of the method
param_count:
number of parameters. -1 for any number.
flags:
flags which must be set in the method
-Remarks -

- Obtains a MonoMethod with a given name and number of parameters. - It only works if there are no multiple signatures for any given method name. - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-codegen.html b/docs/deploy/mono-api-codegen.html deleted file mode 100644 index ef2db8fafb..0000000000 --- a/docs/deploy/mono-api-codegen.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - mono-api-codegen.html - - - -

Code manager

- - -
-
mono_code_manager_commit
- -
void -mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsize) - -
-

-Parameters -

cman:
a code manager
data:
the pointer returned by mono_code_manager_reserve ()
size:
the size requested in the call to mono_code_manager_reserve ()
newsize:
the new size to reserve
-Remarks -

- If we reserved too much room for a method and we didn't allocate - already from the code manager, we can get back the excess allocation - for later use in the code manager. - -

-
-
mono_code_manager_destroy
- -
void -mono_code_manager_destroy (MonoCodeManager *cman) - -
-

-Parameters -

cman:
a code manager
-Remarks -

- Free all the memory associated with the code manager cman. - -

-
-
mono_code_manager_foreach
- -
void -mono_code_manager_foreach (MonoCodeManager *cman, MonoCodeManagerFunc func, void *user_data) - -
-

-Parameters -

cman:
a code manager
func:
a callback function pointer
user_data:
additional data to pass to func
-Remarks -

- Invokes the callback func for each different chunk of memory allocated - in the code manager cman. - -

-
-
mono_code_manager_invalidate
- -
void -mono_code_manager_invalidate (MonoCodeManager *cman) - -
-

-Parameters -

cman:
a code manager
-Remarks -

- Fill all the memory with an invalid native code value - so that any attempt to execute code allocated in the code - manager cman will fail. This is used for debugging purposes. - -

-
-
mono_code_manager_new_dynamic
- -
MonoCodeManager* -mono_code_manager_new_dynamic (void) - -
-

-Returns -

the new code manager -
-Remarks -

- Creates a new code manager suitable for holding native code that can be - used for single or small methods that need to be deallocated independently - of other native code. - - -

-
-
mono_code_manager_new
- -
MonoCodeManager* -mono_code_manager_new (void) - -
-

-Returns -

the new code manager -
-Remarks -

- Creates a new code manager. A code manager can be used to allocate memory - suitable for storing native code that can be later executed. - A code manager allocates memory from the operating system in large chunks - (typically 64KB in size) so that many methods can be allocated inside them - close together, improving cache locality. - - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-counters.html b/docs/deploy/mono-api-counters.html deleted file mode 100644 index 76706d2967..0000000000 --- a/docs/deploy/mono-api-counters.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - mono-api-counters.html - - - -

Counters

- -

Counters is a Mono API for flexible statistics collection - and is used to track different events inside the JIT. - -

You would typically register an address with the - mono_counters_register routine and increment the - counters from your application as you go. At the end of the - program you would call mono_counters_dump which will display - all the registered counters. - -

If you need more complicated counter computation, a - function can be provided instead of an address. In that case - the MONO_COUNTER_CALLBACK flag must be ored in the - type request. - -

The types that can be rendered are: - -

-       MONO_COUNTER_INT
-       MONO_COUNTER_UINT
-       MONO_COUNTER_WORD
-       MONO_COUNTER_LONG
-       MONO_COUNTER_ULONG
-       MONO_COUNTER_DOUBLE
-       MONO_COUNTER_STRING
-
- -

To organize the output, you register also a section where - the counter will be displayed, or one of the following values - when you register your counter: - -

-
-       MONO_COUNTER_JIT
-       MONO_COUNTER_GC
-       MONO_COUNTER_METADATA
-       MONO_COUNTER_GENERICS
-       MONO_COUNTER_SECURITY
-
- - -
-
mono_counters_dump
- -
void -mono_counters_dump (int section_mask, FILE *outfile) - -
-

-Parameters -

section_mask:
The sections to dump counters for
outfile:
a FILE to dump the results to
-Remarks -

- Displays the counts of all the enabled counters registered. - To filter by variance, you can OR one or more variance with the specific section you want. - Use MONO_COUNTER_SECTION_MASK to dump all categories of a specific variance. - -

-
-
mono_counters_enable
- -
void -mono_counters_enable (int section_mask) - -
-

-Parameters -

section_mask:
a mask listing the sections that will be displayed
-Remarks -

- This is used to track which counters will be displayed. - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-debug.html b/docs/deploy/mono-api-debug.html deleted file mode 100644 index 78b31a386d..0000000000 --- a/docs/deploy/mono-api-debug.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - mono-api-debug.html - - - - -
-
mono_debug_il_offset_from_address
- -
gint32 -mono_debug_il_offset_from_address (MonoMethod *method, MonoDomain *domain, guint32 native_offset) - -
-

-Remarks -

- Compute the IL offset corresponding to NATIVE_OFFSET inside the native - code of METHOD in DOMAIN. - -

-
-
mono_debug_add_method
- -
Prototype: mono_debug_add_method
-

- -

-
-
mono_debug_close_mono_symbol_file
- -
Prototype: mono_debug_close_mono_symbol_file
-

- -

-
-
mono_debug_find_method
- -
Prototype: mono_debug_find_method
-

- -

-
-
mono_debug_using_mono_debugger
- -
Prototype: mono_debug_using_mono_debugger
-

- - -

Mono Debugger Interface

- -

These are methods that are invoked by the debugger at - runtime. - - -

-
mono_debugger_breakpoint_callback
- -
Prototype: mono_debugger_breakpoint_callback
-

- -

-
-
mono_debugger_check_runtime_version
- -
Prototype: mono_debugger_check_runtime_version
-

- -

-
-
mono_debugger_event
- -
Prototype: mono_debugger_event
-

- -

-
-
mono_debugger_handle_exception
- -
Prototype: mono_debugger_handle_exception
-

- -

-
-
mono_debugger_insert_breakpoint_full
- -
Prototype: mono_debugger_insert_breakpoint_full
-

- -

-
-
mono_debugger_insert_breakpoint
- -
Prototype: mono_debugger_insert_breakpoint
-

- -

-
-
mono_debugger_lock
- -
Prototype: mono_debugger_lock
-

- -

-
-
mono_debugger_method_has_breakpoint
- -
Prototype: mono_debugger_method_has_breakpoint
-

- -

-
-
mono_debugger_remove_breakpoint
- -
Prototype: mono_debugger_remove_breakpoint
-

- -

-
-
mono_debugger_runtime_invoke
- -
Prototype: mono_debugger_runtime_invoke
-

- -

-
-
mono_debugger_unlock
- -
Prototype: mono_debugger_unlock
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-decimal.html b/docs/deploy/mono-api-decimal.html deleted file mode 100644 index f6338f5b2c..0000000000 --- a/docs/deploy/mono-api-decimal.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - mono-api-decimal.html - - - -

Decimal Support

- -

You can use the mono_decimal functions to access and - manipulate System.Decimal types from C. - - -

-
mono_decimal2double
- -
Prototype: mono_decimal2double
-

- -

-
-
mono_decimal2Int64
- -
gint32 mono_decimal2Int64(/*[In]*/decimal_repr* pA, gint64* pResult) - -
-

-Parameters -

pA:
pResult:
-Remarks -

converts a decimal to an Int64 without rounding - -

-
-
mono_decimal2string
- -
Prototype: mono_decimal2string
-

- -

-
-
mono_decimal2UInt64
- -
gint32 mono_decimal2UInt64(/*[In]*/decimal_repr* pA, guint64* pResult) - -
-

-Remarks -

pA - pResult - converts a decimal to an UInt64 without rounding - -

-
-
mono_decimalCompare
- -
Prototype: mono_decimalCompare
-

- -

-
-
mono_decimalDiv
- -
Prototype: mono_decimalDiv
-

- -

-
-
mono_decimalFloorAndTrunc
- -
Prototype: mono_decimalFloorAndTrunc
-

- -

-
-
mono_decimalIncr
- -
Prototype: mono_decimalIncr
-

- -

-
-
mono_decimalIntDiv
- -
Prototype: mono_decimalIntDiv
-

- -

-
-
mono_decimalMult
- -
Prototype: mono_decimalMult
-

- -

-
-
mono_decimalRound
- -
Prototype: mono_decimalRound
-

- -

-
-
mono_decimalSetExponent
- -
Prototype: mono_decimalSetExponent
-

- -

-
-
mono_double2decimal
- -
Prototype: mono_double2decimal
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-domains.html b/docs/deploy/mono-api-domains.html deleted file mode 100644 index 3966740020..0000000000 --- a/docs/deploy/mono-api-domains.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - mono-api-domains.html - - - -

Application Domains

- -

Synopsis

- -
-#include <metadata/appdomain.h> - -/* Managed AppDomain */ -typedef struct _MonoAppDomain MonoAppDomain; - -/* Unmanaged representation */ -typedef struct _MonoDomain MonoDomain; - -/* Represents System.Runtime.Remoting.Contexts.Context */ -typedef struct _MonoAppContext MonoAppContext -MonoAssembly* mono_domain_assembly_open (MonoDomain *domain, - const char *name); - -gboolean mono_domain_finalize (MonoDomain *domain, - guint32 timeout) ; - - - -MonoDomain* mono_domain_get_by_id (gint32 domainid) ; -MonoDomain* mono_domain_get (); -gboolean mono_domain_has_type_resolve (MonoDomain *domain); - -void mono_domain_set_internal (MonoDomain *domain); -gboolean mono_domain_set (MonoDomain *domain, - gboolean force); -MonoReflectionAssembly* mono_domain_try_type_resolve (MonoDomain *domain, - char *name, - MonoObject *tb); -gboolean mono_domain_owns_vtable_slot (MonoDomain *domain, - gpointer vtable_slot); - - - -
- -

Application domains are used to isolate multiple - applications on a single Mono virtual machine. They are - conceptually similiar to processes, the difference is that - processes are managed by the operating system, while - application domains are managed by the Mono virtual machine. - -

For more information on applications domains see the AppDomain FAQ. - -

The MonoDomain is the unmanaged representation of - the System.AppDomain - managed type, while the MonoAppDomain type represents - the managed version (MonoAppDomain has a pointer to - a MonoDomain). - - -

-
mono_domain_assembly_open
- -
MonoAssembly* -mono_domain_assembly_open (MonoDomain *domain, const char *name) - -
-

-Parameters -

domain:
the application domain
name:
file name of the assembly
-Remarks -

- fixme: maybe we should integrate this with mono_assembly_open ?? - -

-
-
mono_domain_create
- -
Prototype: mono_domain_create
-

- -

-
-
mono_domain_finalize
- -
-gboolean -mono_domain_finalize (MonoDomain *domain, guint32 timeout) - -
-

-Parameters -

domain:
the domain to finalize
timeout:
msects to wait for the finalization to complete, -1 to wait indefinitely
-Returns -
TRUE if succeeded, FALSE if there was a timeout -
-Remarks -

- Request finalization of all finalizable objects inside domain. Wait - timeout msecs for the finalization to complete. - - -

-
-
mono_domain_foreach
- -
Prototype: mono_domain_foreach
-

- -

-
-
mono_domain_free
- -
Prototype: mono_domain_free
-

- -

-
-
mono_domain_get_by_id
- -
Prototype: mono_domain_get_by_id
-

- -

-
-
mono_domain_get_id
- -
MonoDomain* -mono_domain_get_by_id (gint32 domainid) - -
-

-Parameters -

domainid:
the ID
-Returns -
the a domain for a specific domain id. -
- -
-
-
mono_domain_get
- -
MonoDomain* -mono_domain_get () - -
-

-Returns -

the current domain, to obtain the root domain use - - mono_get_root_domain().
- -
-
-
mono_domain_has_type_resolve
- -
gboolean -mono_domain_has_type_resolve (MonoDomain *domain) - -
-

-Parameters -

domain:
application domains being looked up
-Remarks -

- Returns true if the AppDomain.TypeResolve field has been - set. - -

-
-
mono_domain_is_unloading
- -
Prototype: mono_domain_is_unloading
-

- -

-
-
mono_domain_set_internal
- -
void -mono_domain_set_internal (MonoDomain *domain) - -
-

-Parameters -

domain:
the new domain
-Remarks -

- Sets the current domain to domain. - -

-
-
mono_domain_set
- -
gboolean -mono_domain_set (MonoDomain *domain, gboolean force) - -
-

-Parameters -

domain:
domain
force:
force setting.
-Returns -
- - TRUE on success; - FALSE if the domain is unloaded
-Remarks -

- Set the current appdomain to domain. If force is set, set it even - if it is being unloaded. - - -

-
-
mono_domain_try_type_resolve
- -
MonoReflectionAssembly* -mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *tb) - -
-

-Parameters -

domain:
application domainwhere the name where the type is going to be resolved
name:
the name of the type to resolve or NULL.
tb:
A System.Reflection.Emit.TypeBuilder, used if name is NULL.
-Returns -
A MonoReflectionAssembly or NULL if not found -
-Remarks -

- This routine invokes the internal System.AppDomain.DoTypeResolve and returns - the assembly that matches name. - - If name is null, the value of ((TypeBuilder)tb).FullName is used instead - - -

-
-
mono_domain_owns_vtable_slot
- -
gboolean -mono_domain_owns_vtable_slot (MonoDomain *domain, gpointer vtable_slot) - -
-

-Remarks -

- Returns whenever VTABLE_SLOT is inside a vtable which belongs to DOMAIN. - - -

Contexts

- - -
-
mono_context_get
- -
Prototype: mono_context_get
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-dynamic-codegen.html b/docs/deploy/mono-api-dynamic-codegen.html deleted file mode 100644 index c25acd6b79..0000000000 --- a/docs/deploy/mono-api-dynamic-codegen.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - mono-api-dynamic-codegen.html - - - -

Dynamic Code Generation

- -

The dynamic code generation interface inside the Mono - runtime is similar to the API exposed by - System.Reflection.Emit. - -

This interface is used by Mono internally to generate code - on the flight in a cross-platform fashion. For example, - P/Invoke marshalling in Mono is implemented in terms of this - interface, but it is also used in various other parts of the - runtime. - -

Unlike Reflection.Emit, the dynamic code generation - interface does not start with an assembly builder. The code - generation interface starts directly at the method level, - which is represented by a pointer to the MonoMethodBuilder - structure. - -

To JIT this method, the process is this: - -

- -

The result of this process is a MonoMethod which - can be called using mono_create_jit_trampoline - routine or can be passed to any other functions that require - the MonoMethod. - -

Example: - -

-MonoMethod *adder ()
-{
-    MonoMethodBuilder *mb;
-    MonoMethodSignature *sig;
-    MonoMethod *method;
-    
-    mb = mono_mb_new (mono_defaults.object_class, "adder", MONO_WRAPPER_NONE);
-
-    /* Setup method signature */
-    sig = mono_metadata_signature_alloc (2);
-    sig->ret = &mono_get_int32_class ()->byval_arg;
-    sig->params [0] = &mono_get_int32_class ()->byval_arg;
-    sig->params [1] = &mono_defaults.int32_class->byval_arg;
-
-    /* Emit CIL code */
-    mono_mb_emit_ldarg (mb, 0);
-    mono_mb_emit_ldarg (mb, 1);
-    mono_mb_emit_byte (mb, CEE_ADD);
-    mono_mb_emit_byte (mb, CEE_RET);
-
-    /* Get the method */
-    method = mono_mb_create_method (mb, sig, max_stack);
-    
-    /* Cleanup */
-    mono_mb-free (mb);
-    return method;
-}
-	
- - -
-
mono_mb_new
- -
Prototype: mono_mb_new
-

- - -

The possible values for the type argument are: - -

-        MONO_WRAPPER_NONE
-        MONO_WRAPPER_DELEGATE_INVOKE
-        MONO_WRAPPER_DELEGATE_BEGIN_INVOKE
-        MONO_WRAPPER_DELEGATE_END_INVOKE
-        MONO_WRAPPER_RUNTIME_INVOKE
-        MONO_WRAPPER_NATIVE_TO_MANAGED
-        MONO_WRAPPER_MANAGED_TO_NATIVE
-        MONO_WRAPPER_REMOTING_INVOKE
-        MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK
-        MONO_WRAPPER_XDOMAIN_INVOKE
-        MONO_WRAPPER_XDOMAIN_DISPATCH
-        MONO_WRAPPER_LDFLD
-        MONO_WRAPPER_STFLD
-        MONO_WRAPPER_LDFLD_REMOTE
-        MONO_WRAPPER_STFLD_REMOTE
-        MONO_WRAPPER_SYNCHRONIZED
-        MONO_WRAPPER_DYNAMIC_METHOD
-        MONO_WRAPPER_ISINST
-        MONO_WRAPPER_CASTCLASS
-        MONO_WRAPPER_PROXY_ISINST
-        MONO_WRAPPER_STELEMREF
-        MONO_WRAPPER_UNBOX
-        MONO_WRAPPER_LDFLDA
-        MONO_WRAPPER_UNKNOWN
-
- -

Emitting IL

- -

Functions that can be used to generate IL on the flight, - similar in spirit to System.Reflection.Emit.ILGenerator. - - -

-
mono_mb_emit_add_to_local
- -
Prototype: mono_mb_emit_add_to_local
-

- -

-
-
mono_mb_emit_branch
- -
Prototype: mono_mb_emit_branch
-

- -

-
-
mono_mb_emit_byte
- -
Prototype: mono_mb_emit_byte
-

- -

-
-
mono_mb_emit_exception
- -
Prototype: mono_mb_emit_exception
-

- -

-
-
mono_mb_emit_i2
- -
Prototype: mono_mb_emit_i2
-

- -

-
-
mono_mb_emit_i4
- -
Prototype: mono_mb_emit_i4
-

- -

-
-
mono_mb_emit_icon
- -
Prototype: mono_mb_emit_icon
-

- -

-
-
mono_mb_emit_ldarg_addr
- -
Prototype: mono_mb_emit_ldarg_addr
-

- -

-
-
mono_mb_emit_ldarg
- -
Prototype: mono_mb_emit_ldarg
-

- -

-
-
mono_mb_emit_ldflda
- -
Prototype: mono_mb_emit_ldflda
-

- -

-
-
mono_mb_emit_ldloc_addr
- -
Prototype: mono_mb_emit_ldloc_addr
-

- -

-
-
mono_mb_emit_ldloc
- -
Prototype: mono_mb_emit_ldloc
-

- -

-
-
mono_mb_emit_ldstr
- -
Prototype: mono_mb_emit_ldstr
-

- -

-
-
mono_mb_emit_managed_call
- -
Prototype: mono_mb_emit_managed_call
-

- -

-
-
mono_mb_emit_native_call
- -
Prototype: mono_mb_emit_native_call
-

- -

-
-
mono_mb_emit_stloc
- -
Prototype: mono_mb_emit_stloc
-

- - -

Local variables and Methods

- -
-
mono_mb_create_method
- -
MonoMethod* -mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack) - -
-

-Returns -

the newly created method. - -
-Remarks -

- Create a MonoMethod from this method builder. - -

-
-
mono_mb_add_data
- -
Prototype: mono_mb_add_data
-

- -

-
-
mono_mb_add_local
- -
Prototype: mono_mb_add_local
-

- -

-
-
mono_mb_free
- -
Prototype: mono_mb_free
-

- - -

Patching Addresses

- -
-
mono_mb_patch_addr
- -
Prototype: mono_mb_patch_addr
-

- -

-
-
mono_mb_patch_addr_s
- -
Prototype: mono_mb_patch_addr_s
-

- - -

Method Signatures

- -
-
mono_metadata_signature_alloc
- -
Prototype: mono_metadata_signature_alloc
-

- -

-
-
mono_metadata_signature_dup
- -
Prototype: mono_metadata_signature_dup
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-embedding.html b/docs/deploy/mono-api-embedding.html deleted file mode 100644 index 1c4cef595d..0000000000 --- a/docs/deploy/mono-api-embedding.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - mono-api-embedding.html - - - -

Embedding Mono

- -

The simplest way of embedding Mono is illustrated here: -

-int main (int argc, char *argv)
-{
-	/*
-	 * Load the default Mono configuration file, this is needed
-	 * if you are planning on using the dllmaps defined on the
-	 * system configuration
-	 */
-	mono_config_parse (NULL);
-
-	/*
-	 * mono_jit_init() creates a domain: each assembly is
-	 * loaded and run in a MonoDomain.
-	 */
-	MonoDomain *domain = mono_jit_init ("startup.exe");
-
-	/*
-	 * Optionally, add an internal call that your startup.exe
-	 * code can call, this will bridge startup.exe to Mono
-	 */
-	mono_add_internal_call ("Sample::GetMessage", getMessage);
-
-	/*
-	 * Open the executable, and run the Main method declared
-	 * in the executable
-	 */
-	MonoAssembly *assembly = mono_domain_assembly_open (domain, "startup.exe");
-
-	if (!assembly)
-		exit (2);
-	/*
-	 * mono_jit_exec() will run the Main() method in the assembly.
-	 * The return value needs to be looked up from
-	 * System.Environment.ExitCode.
-	 */
-	mono_jit_exec (domain, assembly, argc, argv);
-}
-
-/* The C# signature for this method is: string GetMessage () in class Sample */
-MonoString*
-getMessage ()
-{
-	return mono_string_new (mono_domain_get (), "Hello, world");
-}
-
- - -
-
mono_jit_init
- -
Prototype: mono_jit_init
-

- -

-
-
mono_jit_exec
- -
int -mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]) - -
-

-Parameters -

assembly:
reference to an assembly
argc:
argument count
argv:
argument vector
-Remarks -

- Start execution of a program. - -

-
-
mono_set_dirs
- -
void -mono_set_dirs (const char *assembly_dir, const char *config_dir) - -
-

-Parameters -

assembly_dir:
the base directory for assemblies
config_dir:
the base directory for configuration files
-Remarks -

- This routine is used internally and by developers embedding - the runtime into their own applications. - - There are a number of cases to consider: Mono as a system-installed - package that is available on the location preconfigured or Mono in - a relocated location. - - If you are using a system-installed Mono, you can pass NULL - to both parameters. If you are not, you should compute both - directory values and call this routine. - - The values for a given PREFIX are: - - assembly_dir: PREFIX/lib - config_dir: PREFIX/etc - - Notice that embedders that use Mono in a relocated way must - compute the location at runtime, as they will be in control - of where Mono is installed. - -

-
-
mono_main
- -
int -mono_main (int argc, char* argv[]) - -
-

-Parameters -

argc:
number of arguments in the argv array
argv:
array of strings containing the startup arguments
-Remarks -

- Launches the Mono JIT engine and parses all the command line options - in the same way that the mono command line VM would. - -

-
-
mono_parse_default_optimizations
- -
Prototype: mono_parse_default_optimizations
-

- - -

-
-
mono_jit_cleanup
- -
Prototype: mono_jit_cleanup
-

- -

-
-
mono_set_defaults
- -
Prototype: mono_set_defaults
-

- - -

Internal Calls

- -

The Mono runtime provides two mechanisms to expose C code - to the CIL universe: internal calls and native C - code. Internal calls are tightly integrated with the runtime, - and have the least overhead, as they use the same data types - that the runtime uses. - -

The other option is to use the Platform Invoke (P/Invoke) - to call C code from the CIL universe, using the standard - P/Invoke - mechanisms. - -

To register an internal call, use this call you use the - mono_add_internal_call - routine. - - -

-
mono_add_internal_call
- -
Prototype: mono_add_internal_call
-

- - -

P/Invoke with embedded applications

- -

Unlike internal calls, Platform/Invoke is easier to use and - more portable. It allows you to share code with Windows and - .NET that have a different setup for internal calls to their - own runtime. - -

Usually P/Invoke declarations reference external libraries - like: - -

-	[DllImport ("opengl")]
-	void glBegin (GLEnum mode)
-	
- -

Mono extends P/Invoke to support looking up symbols not in - an external library, but looking up those symbols into the - same address space as your program, to do this, use the - special library name "__Internal". This will direct Mono to - lookup the method in your own process. - -

There are situations where the host operating system does - not support looking up symbols on the process address space. - For situations like this you can use - the mono_dl_register_library. - -

mono_dl_register_library

- -

Data Marshalling

- -

Managed objects are represented as MonoObject* - types. Those objects that the runtime consumes directly have - more specific C definitions (for example strings are of type - MonoString *, delegates are of type - MonoDelegate* but they are still MonoObject - *s). - -

As of Mono 1.2.x types defined in mscorlib.dll do not have - their fields reordered in any way. But other libraries might - have their fields reordered. In these cases, Managed - structures and objects have the same layout in the C# code as - they do in the unmanaged world. - -

Structures defined outside corlib must have a specific - StructLayout definition, and have it set as sequential if you - plan on accessing these fields directly from C code. - -

Important Internal calls do not provide support for - marshalling structures. This means that any API calls that - take a structure (excluding the system types like int32, - int64, etc) must be passed as a pointer, in C# this means - passing the value as a "ref" or "out" parameter. - -

Mono Runtime Configuration

- -

Certain features of the Mono runtime, like DLL mapping, are - available through a configuration file that is loaded at - runtime. The default Mono implementation loads the - configuration file from $sysconfig/mono/config - (typically this is /etc/mono/config). - -

See the mono-config(5) man page for more details - on what goes in this file. - -

The following APIs expose this functionality: - - -

-
mono_config_parse
- -
void -mono_config_parse (const char *filename) -
-

-Parameters -

filename:
the filename to load the configuration variables from.
-Remarks -

- Pass a NULL filename to parse the default config files - (or the file in the MONO_CONFIG env var). - -

-
-
mono_config_parse_memory
- -
void -mono_config_parse_memory (const char *buffer) - -
-

-Parameters -

buffer:
a pointer to an string XML representation of the configuration
-Remarks -

- Parses the configuration from a buffer - -

-
-
mono_get_config_dir
- -
Prototype: mono_get_config_dir
-

- - -

Function Pointers

- -

To wrap a function pointer into something that the Mono - runtime can consume, you should use the mono_create_ftnptr. - This is only important if you plan on running on the IA64 - architecture. Otherwise you can just use the function - pointer address. - - -

-
mono_create_ftnptr
- -
Prototype: mono_create_ftnptr
-

- - -

Advanced Execution Setups

- -

These are not recommended ways of initializing Mono, they - are done internally by mono_jit_init, but are here to explain - what happens internally. - - -

-
mono_runtime_exec_managed_code
- -
void -mono_runtime_exec_managed_code (MonoDomain *domain, - MonoMainThreadFunc main_func, - gpointer main_args) - -
-

-Parameters -

domain:
Application domain
main_func:
function to invoke from the execution thread
main_args:
parameter to the main_func
-Remarks -

- Launch a new thread to execute a function - - main_func is called back from the thread with main_args as the - parameter. The callback function is expected to start Main() - eventually. This function then waits for all managed threads to - finish. - It is not necesseray anymore to execute managed code in a subthread, - so this function should not be used anymore by default: just - execute the code and then call mono_thread_manage (). - -

-
-
mono_runtime_exec_main
- -
Prototype: mono_runtime_exec_main
-

- -

-
-
mono_init_from_assembly
- -
MonoDomain* -mono_init_from_assembly (const char *domain_name, const char *filename) - -
-

-Parameters -

domain_name:
name to give to the initial domain
filename:
filename to load on startup
-Returns -
the initial domain. -
-Remarks -

- Used by the runtime, users should use mono_jit_init instead. - - Creates the initial application domain and initializes the mono_defaults - structure. - This function is guaranteed to not run any IL code. - The runtime is initialized using the runtime version required by the - provided executable. The version is determined by looking at the exe - configuration file and the version PE field) - - -

-
-
mono_init
- -
MonoDomain* -mono_init (const char *domain_name) - -
-

-Returns -

the initial domain. -
-Remarks -

- - Creates the initial application domain and initializes the mono_defaults - structure. - This function is guaranteed to not run any IL code. - The runtime is initialized using the default runtime version. - - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-exc.html b/docs/deploy/mono-api-exc.html deleted file mode 100644 index 774a8a61d4..0000000000 --- a/docs/deploy/mono-api-exc.html +++ /dev/null @@ -1,694 +0,0 @@ - - - - mono-api-exc.html - - - -

Exception Handling

- -
-void mono_raise_exception (MonoException *ex) ; -void mono_unhandled_exception (MonoObject *exc); -void mono_print_unhandled_exception (MonoObject *exc); -MonoException* mono_exception_from_name_domain (MonoDomain *domain, - MonoImage *image, - ; -MonoException* mono_exception_from_name (MonoImage *image, - const char *name_space; -MonoException* mono_exception_from_name_msg (MonoImage *image, - const char *name_space; -MonoException* mono_exception_from_name_two_strings (MonoImage *image, - const char *name_space; -MonoException* mono_get_exception_appdomain_unloaded (void); -MonoException* mono_get_exception_argument (const char *arg, - const char *msg); -MonoException* mono_get_exception_argument_null (const char *arg); -MonoException* mono_get_exception_argument_out_of_range (const char *arg); -MonoException* mono_get_exception_arithmetic (); -MonoException* mono_get_exception_array_type_mismatch (); -MonoException* mono_get_exception_bad_image_format (const char *msg); -MonoException* mono_get_exception_cannot_unload_appdomain (const char *msg); - -MonoException* mono_get_exception_divide_by_zero (); -MonoException* mono_get_exception_execution_engine (const char *msg); -MonoException* mono_get_exception_file_not_found2 (const char *msg, - MonoString *fname); -MonoException* mono_get_exception_file_not_found (MonoString *fname); -MonoException* mono_get_exception_index_out_of_range (); -MonoException* mono_get_exception_invalid_cast (); -MonoException* mono_get_exception_io (const char *msg); -MonoException* mono_get_exception_missing_method (const char *class_name, - const char *member_name); -MonoException* mono_get_exception_not_implemented (const char *msg); -MonoException* mono_get_exception_null_reference (); -MonoException* mono_get_exception_overflow (); -MonoException* mono_get_exception_security (); -MonoException* mono_get_exception_serialization (const char *msg); -MonoException* mono_get_exception_stack_overflow (void); -MonoException* mono_get_exception_synchronization_lock (const char *msg); -MonoException* mono_get_exception_thread_abort (); -MonoException* mono_get_exception_thread_state (const char *msg); -MonoException* mono_get_exception_type_initialization (const gchar *type_name, - MonoException *inner); -MonoException* mono_get_exception_type_load (MonoString *class_name, - char *assembly_name); -MonoException* mono_get_exception_invalid_operation (const char *msg); -MonoException* mono_get_exception_missing_field (const char *class_name, - const char *member_name); -MonoException* mono_get_exception_not_supported (const char *msg); -MonoException* mono_get_exception_reflection_type_load (MonoArray *types, - MonoArray *exceptions); - -
- -

Raising and Catching exceptions

- - -
-
mono_raise_exception
- -
void -mono_raise_exception (MonoException *ex) - -
-

-Parameters -

ex:
exception object
-Remarks -

- Signal the runtime that the exception ex has been raised in unmanaged code. - -

-
-
mono_unhandled_exception
- -
void -mono_unhandled_exception (MonoObject *exc) - -
-

-Parameters -

exc:
exception thrown
-Remarks -

- This is a VM internal routine. - - We call this function when we detect an unhandled exception - in the default domain. - - It invokes the * UnhandledException event in AppDomain or prints - a warning to the console - -

-
-
mono_print_unhandled_exception
- -
void -mono_print_unhandled_exception (MonoObject *exc) - -
-

-Parameters -

exc:
The exception
-Remarks -

- Prints the unhandled exception. - - - -

Exception Types: General API

- - -
-
mono_exception_from_name_domain
- -
MonoException* -mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image, - const char* name_space, const char *name) - -
-

-Parameters -

domain:
Domain where the return object will be created.
image:
the Mono image where to look for the class
name_space:
the namespace for the class
name:
class name
-Returns -
the initialized exception instance. -
-Remarks -

- Creates an exception object of the given namespace/name class on - the given domain. - - -

-
-
mono_exception_from_name
- -
MonoException* -mono_exception_from_name (MonoImage *image, const char *name_space, - const char *name) - -
-

-Parameters -

image:
the Mono image where to look for the class
name_space:
the namespace for the class
name:
class name
-Returns -
the initialized exception instance. -
-Remarks -

- Creates an exception of the given namespace/name class in the - current domain. - - -

-
-
mono_exception_from_name_msg
- -
MonoException* -mono_exception_from_name_msg (MonoImage *image, const char *name_space, - const char *name, const char *msg) - -
-

-Parameters -

image:
the Mono image where to look for the class
name_space:
the namespace for the class
name:
class name
msg:
the message to embed inside the exception
-Returns -
the initialized exception instance. -
-Remarks -

- Creates an exception and initializes its message field. - - -

-
-
mono_exception_from_name_two_strings
- -
MonoException* -mono_exception_from_name_two_strings (MonoImage *image, const char *name_space, - const char *name, MonoString *a1, MonoString *a2) - -
-

-Parameters -

image:
the Mono image where to look for the class
name_space:
the namespace for the class
name:
class name
a1:
first string argument to pass
a2:
second string argument to pass
-Returns -
the initialized exception instance. -
-Remarks -

- Creates an exception from a constructor that takes two string - arguments. - - - -

Obtaining Common Exceptions

- -

There are a number of common exceptions that are used by - the runtime, use the routines in this section to get a copy of - those exceptions. - - -

-
mono_get_exception_appdomain_unloaded
- -
MonoException* -mono_get_exception_appdomain_unloaded (void) - -
-

-Returns -

a new instance of the System.AppDomainUnloadedException -
- -
-
-
mono_get_exception_argument
- -
MonoException* -mono_get_exception_argument (const char *arg, const char *msg) - -
-

-Parameters -

arg:
the name of the invalid argument.
-Returns -
a new instance of the System.ArgumentException -
- -
-
-
mono_get_exception_argument_null
- -
MonoException* -mono_get_exception_argument_null (const char *arg) - -
-

-Parameters -

arg:
the name of the argument that is null
-Returns -
a new instance of the System.ArgumentNullException -
- -
-
-
mono_get_exception_argument_out_of_range
- -
MonoException* -mono_get_exception_argument_out_of_range (const char *arg) - -
-

-Parameters -

arg:
the name of the out of range argument.
-Returns -
a new instance of the System.ArgumentOutOfRangeException -
- -
-
-
mono_get_exception_arithmetic
- -
MonoException* -mono_get_exception_arithmetic () - -
-

-Returns -

a new instance of the System.ArithmeticException. -
- -
-
-
mono_get_exception_array_type_mismatch
- -
MonoException* -mono_get_exception_array_type_mismatch () - -
-

-Returns -

a new instance of the System.ArrayTypeMismatchException -
- -
-
-
mono_get_exception_bad_image_format
- -
MonoException* -mono_get_exception_bad_image_format (const char *msg) - -
-

-Parameters -

msg:
an informative message for the user.
-Returns -
a new instance of the System.BadImageFormatException -
- -
-
-
mono_get_exception_cannot_unload_appdomain
- -
MonoException* -mono_get_exception_cannot_unload_appdomain (const char *msg) - -
-

-Parameters -

inner:
the inner exception.
-Returns -
a new instance of the System.CannotUnloadAppDomainException -
- -
-
-
mono_get_exception_class
- -
Prototype: mono_get_exception_class
-

- -

-
-
mono_get_exception_divide_by_zero
- -
MonoException* -mono_get_exception_divide_by_zero () - -
-

-Returns -

a new instance of the System.DivideByZeroException -
- -
-
-
mono_get_exception_execution_engine
- -
MonoException* -mono_get_exception_execution_engine (const char *msg) - -
-

-Parameters -

msg:
the message to pass to the user
-Returns -
a new instance of the System.ExecutionEngineException -
- -
-
-
mono_get_exception_file_not_found2
- -
MonoException* -mono_get_exception_file_not_found2 (const char *msg, MonoString *fname) - -
-

-Parameters -

msg:
an informative message for the user.
fname:
the name of the file not found.
-Returns -
a new instance of the System.IO.FileNotFoundException -
- -
-
-
mono_get_exception_file_not_found
- -
MonoException* -mono_get_exception_file_not_found (MonoString *fname) - -
-

-Parameters -

fname:
the name of the file not found.
-Returns -
a new instance of the System.IO.FileNotFoundException -
- -
-
-
mono_get_exception_index_out_of_range
- -
MonoException* -mono_get_exception_index_out_of_range () - -
-

-Returns -

a new instance of the System.IndexOutOfRangeException -
- -
-
-
mono_get_exception_invalid_cast
- -
MonoException* -mono_get_exception_invalid_cast () - -
-

-Returns -

a new instance of the System.InvalidCastException -
- -
-
-
mono_get_exception_io
- -
MonoException* -mono_get_exception_io (const char *msg) - -
-

-Parameters -

msg:
the message to present to the user
-Returns -
a new instance of the System.IO.IOException -
- -
-
-
mono_get_exception_missing_method
- -
MonoException* -mono_get_exception_missing_method (const char *class_name, const char *member_name) - -
-

-Parameters -

class_name:
the class where the lookup was performed.
member_name:
the name of the missing method.
-Returns -
a new instance of the System.MissingMethodException -
- -
-
-
mono_get_exception_not_implemented
- -
MonoException* -mono_get_exception_not_implemented (const char *msg) - -
-

-Parameters -

msg:
the message to pass to the user
-Returns -
a new instance of the System.NotImplementedException -
- -
-
-
mono_get_exception_null_reference
- -
MonoException* -mono_get_exception_null_reference () - -
-

-Returns -

a new instance of the System.NullReferenceException -
- -
-
-
mono_get_exception_overflow
- -
MonoException* -mono_get_exception_overflow () - -
-

-Returns -

a new instance of the System.OverflowException -
- -
-
-
mono_get_exception_security
- -
MonoException* -mono_get_exception_security () - -
-

-Returns -

a new instance of the System.Security.SecurityException -
- -
-
-
mono_get_exception_serialization
- -
MonoException* -mono_get_exception_serialization (const char *msg) - -
-

-Parameters -

msg:
the message to pass to the user
-Returns -
a new instance of the System.Runtime.Serialization.SerializationException -
- -
-
-
mono_get_exception_stack_overflow
- -
MonoException* -mono_get_exception_stack_overflow (void) - -
-

-Returns -

a new instance of the System.StackOverflowException -
- -
-
-
mono_get_exception_synchronization_lock
- -
MonoException* -mono_get_exception_synchronization_lock (const char *msg) - -
-

-Parameters -

inner:
the inner exception.
-Returns -
a new instance of the System.SynchronizationLockException -
- -
-
-
mono_get_exception_thread_abort
- -
MonoException* -mono_get_exception_thread_abort () - -
-

-Returns -

a new instance of the System.Threading.ThreadAbortException. -
- -
-
-
mono_get_exception_thread_state
- -
MonoException* -mono_get_exception_thread_state (const char *msg) - -
-

-Parameters -

msg:
the message to present to the user
-Returns -
a new instance of the System.Threading.ThreadStateException -
- -
-
-
mono_get_exception_type_initialization
- -
MonoException* -mono_get_exception_type_initialization (const gchar *type_name, MonoException *inner) - -
-

-Parameters -

type_name:
the name of the type that failed to initialize.
inner:
the inner exception.
-Returns -
a new instance of the System.TypeInitializationException -
- -
-
-
mono_get_exception_type_load
- -
MonoException* -mono_get_exception_type_load (MonoString *class_name, char *assembly_name) - -
-

-Parameters -

class_name:
the name of the class that could not be loaded
assembly_name:
the assembly where the class was looked up.
-Returns -
a new instance of the System.TypeLoadException. -
- -
-
-
mono_get_exception_invalid_operation
- -
MonoException* -mono_get_exception_invalid_operation (const char *msg) - -
-

-Parameters -

msg:
the message to pass to the user
-Returns -
a new instance of the System.InvalidOperationException -
- -
-
-
mono_get_exception_missing_field
- -
MonoException* -mono_get_exception_missing_field (const char *class_name, const char *member_name) - -
-

-Parameters -

class_name:
the class where the lookup was performed
member_name:
the name of the missing method.
-Returns -
a new instance of the System.MissingFieldException -
- -
-
-
mono_get_exception_not_supported
- -
MonoException* -mono_get_exception_not_supported (const char *msg) - -
-

-Parameters -

msg:
the message to pass to the user
-Returns -
a new instance of the System.NotSupportedException -
- -
- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-gc.html b/docs/deploy/mono-api-gc.html deleted file mode 100644 index 047b6cf092..0000000000 --- a/docs/deploy/mono-api-gc.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - mono-api-gc.html - - - -

Garbage Collector Interface

- -

Public Interface

- -

The public interface of the Mono GC is fairly limited, and - its the only one that embedders should be using: - - -

-
mono_gc_collect
- -
void -mono_gc_collect (int generation) - -
-

-Parameters -

generation:
GC generation identifier
-Remarks -

- Perform a garbage collection for the given generation, higher numbers - mean usually older objects. Collecting a high-numbered generation - implies collecting also the lower-numbered generations. - The maximum value for generation can be retrieved with a call to - mono_gc_max_generation(), so this function is usually called as: - - mono_gc_collect (mono_gc_max_generation ()); - -

-
-
mono_gc_max_generation
- -
int -mono_gc_max_generation (void) - -
-

-Returns -

the maximum generation number. -
-Remarks -

- Get the maximum generation number used by the current garbage - collector. The value will be 0 for the Boehm collector, 1 or more - for the generational collectors. - - -

-
-
mono_gc_get_heap_size
- -
int64_t -mono_gc_get_heap_size (void) - -
-

-Returns -

the size of the heap in bytes -
-Remarks -

- Get the amount of memory used by the garbage collector. - - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-gchandle.html b/docs/deploy/mono-api-gchandle.html deleted file mode 100644 index 84b9fc22dd..0000000000 --- a/docs/deploy/mono-api-gchandle.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - mono-api-gchandle.html - - - -

GC Handles

- -

Synopsys

- -
-guint32 mono_gchandle_new (MonoObject *obj, - gboolean pinned); -guint32 mono_gchandle_new_weakref (MonoObject *obj, - gboolean track_resurrection); -MonoObject* mono_gchandle_get_target (guint32 gchandle); -void mono_gchandle_free (guint32 gchandle); - -
- -

GC handles are wrappers that are used to keep references to - managed objects in the unmanaged space and preventing the - object from being disposed. - -

These are the C equivalents of the System.GCHandle - structure. - -

There are two kinds of GCHandles that can be created: - -

- -

To retrieve the target address of an object pointed to by a - GCHandle you should use - mono_gchandle_get_target. - -

For example, consider the following C code: -

-static MonoObject* o = NULL; -
- -

The object in `o' will *NOT* be scanned. - -

If you need to store an object in a C variable and prevent - it from being collected, you need to acquire a GC handle for - it. - -

- guint32 handle = mono_gchandle_new (my_object, TRUE); -
- -

TRUE means the object will be pinned, so it won't move in - memory when we'll use a moving GC. You can access the - MonoObject* referenced by a handle with: - -

- MonoObject* obj = mono_gchandle_get_target (handle); -
- -

When you don't need the handle anymore you need to call: - -

- mono_gchandle_free (handle); -
- -

Note that if you assign a new object to the C var, you need - to get a new handle, it's not enough to store a new object in - the C var. - -

So code that looked like this: - -

- static MonoObject* o = NULL; - ... - o = mono_object_new (...); - /* use o */ - ... - /* when done to allow the GC to collect o */ - o = NULL; -
- -

should now be changed to: - -

- static guint32 o_handle; - ... - MonoObject *o = mono_object_new (...); - o_handle = mono_gchandle_new (o, TRUE); - /* use o or mono_gchandle_get_target (o_handle) */ - ... - /* when done to allow the GC to collect o */ - mono_gchandle_free (o_handle); -
- - -
-
mono_gchandle_new
- -
guint32 -mono_gchandle_new (MonoObject *obj, gboolean pinned) - -
-

-Parameters -

obj:
managed object to get a handle for
pinned:
whether the object should be pinned
-Returns -
a handle that can be used to access the object from - - unmanaged code.
-Remarks -

- This returns a handle that wraps the object, this is used to keep a - reference to a managed object from the unmanaged world and preventing the - object from being disposed. - -

- If pinned is false the address of the object can not be obtained, if it is - true the address of the object can be obtained. This will also pin the - object so it will not be possible by a moving garbage collector to move the - object. - -

- -

-
-
mono_gchandle_new_weakref
- -
guint32 -mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection) - -
-

-Parameters -

obj:
managed object to get a handle for
pinned:
whether the object should be pinned
-Returns -
a handle that can be used to access the object from - - unmanaged code.
-Remarks -

- This returns a weak handle that wraps the object, this is used to - keep a reference to a managed object from the unmanaged world. - Unlike the mono_gchandle_new the object can be reclaimed by the - garbage collector. In this case the value of the GCHandle will be - set to zero. - -

- If pinned is false the address of the object can not be obtained, if it is - true the address of the object can be obtained. This will also pin the - object so it will not be possible by a moving garbage collector to move the - object. - -

- -

-
-
mono_gchandle_get_target
- -
MonoObject* -mono_gchandle_get_target (guint32 gchandle) - -
-

-Parameters -

gchandle:
a GCHandle's handle.
-Remarks -

- The handle was previously created by calling mono_gchandle_new or - mono_gchandle_new_weakref. - - Returns a pointer to the MonoObject represented by the handle or - NULL for a collected object if using a weakref handle. - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-image.html b/docs/deploy/mono-api-image.html deleted file mode 100644 index cbb8f2dfa9..0000000000 --- a/docs/deploy/mono-api-image.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - mono-api-image.html - - - -

Image Manipulation

- -

Images are the component of assemblies that actually hold - the CIL code and metadata - in the extended PE/COFF file. - -

Synopsis

- -
-#include <metadata/image.h> - -typedef struct _MonoImage MonoImage; -typedef enum { - MONO_IMAGE_OK, - MONO_IMAGE_ERROR_ERRNO, - MONO_IMAGE_MISSING_ASSEMBLYREF, - MONO_IMAGE_IMAGE_INVALID -} MonoImageOpenStatus; - -MonoImage* mono_image_open (const char *fname, - MonoImageOpenStatus *status); - - - -void mono_image_close (MonoImage *image); -void mono_image_addref (MonoImage *image); - - -MonoAssembly* mono_image_get_assembly (MonoImage *image); -guint32 mono_image_get_entry_point (MonoImage *image); -const char* mono_image_get_filename (MonoImage *image); -const char* mono_image_get_name (MonoImage *image); -const char* mono_image_get_resource (MonoImage *image, - guint32 offset, - guint32 *size); - - -gboolean mono_image_is_dynamic (MonoImage *image); - -MonoImage* mono_image_loaded (const char *name); -gpointer mono_image_lookup_resource (MonoImage *image, - guint32 res_id, - guint32 lang_id, - gunichar2 *name); -const char * mono_image_strerror (MonoImageOpenStatus status); -guint32 mono_image_strong_name_position (MonoImage *image, - guint32 *size); -const char* mono_image_get_public_key (MonoImage *image, - guint32 *size); -const char* mono_image_get_strong_name (MonoImage *image, - guint32 *size); -gboolean mono_image_has_authenticode_entry (MonoImage *image); - -int mono_image_ensure_section_idx (MonoImage *image, - int section); -int mono_image_ensure_section (MonoImage *image, - const char *section); - -
- -

Image APIs

- -

Images are the actual elements in the runtime that contain - the actual code being executed. - - -

Opening and closing MonoImages

- - -
-
mono_image_open
- -
MonoImage* -mono_image_open (const char *fname, MonoImageOpenStatus *status) - -
-

-Parameters -

fname:
filename that points to the module we want to open
status:
An error condition is returned in this field
-Returns -
An open image of type %MonoImage or NULL on error. - - The caller holds a temporary reference to the returned image which should be cleared - when no longer needed by calling mono_image_close (). - if NULL, then check the value of status for details on the error
- -
-
-
mono_image_open_full
- -
Prototype: mono_image_open_full
-

- -

-
-
mono_image_open_from_data
- -
Prototype: mono_image_open_from_data
-

- -

-
-
mono_image_open_from_data_full
- -
Prototype: mono_image_open_from_data_full
-

- -

-
-
mono_image_close
- -
void -mono_image_close (MonoImage *image) - -
-

-Parameters -

image:
The image file we wish to close
-Remarks -

- Closes an image file, deallocates all memory consumed and - unmaps all possible sections of the file - -

-
-
mono_image_addref
- -
void -mono_image_addref (MonoImage *image) - -
-

-Parameters -

image:
The image file we wish to add a reference to
-Remarks -

- Increases the reference count of an image. - -

-
-
mono_image_load_file_for_image
- -
Prototype: mono_image_load_file_for_image
-

- - -

Image Information

- - -
-
mono_image_get_guid
- -
Prototype: mono_image_get_guid
-

- -

-
-
mono_image_get_assembly
- -
MonoAssembly* -mono_image_get_assembly (MonoImage *image) - -
-

-Parameters -

image:
the MonoImage.
-Returns -
the assembly that holds this image. -
-Remarks -

- Use this routine to get the assembly that owns this image. - - -

-
-
mono_image_get_entry_point
- -
guint32 -mono_image_get_entry_point (MonoImage *image) - -
-

-Parameters -

image:
the image where the entry point will be looked up.
-Returns -
the token for the entry point method in the image -
-Remarks -

- Use this routine to determine the metadata token for method that - has been flagged as the entry point. - - -

-
-
mono_image_get_filename
- -
const char* -mono_image_get_filename (MonoImage *image) - -
-

-Parameters -

image:
a MonoImage
-Returns -
the filename. -
-Remarks -

- Used to get the filename that hold the actual MonoImage - - -

-
-
mono_image_get_name
- -
const char* -mono_image_get_name (MonoImage *image) - -
-

-Parameters -

name:
a MonoImage
-Returns -
the name of the assembly. -
- -
-
-
mono_image_get_resource
- -
const char* -mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size) - -
-

-Parameters -

image:
the image where the resource will be looked up.
offset:
The offset to add to the resource
size:
a pointer to an int where the size of the resource will be stored
-Returns -
the pointer to the resource whose offset is offset. -
-Remarks -

- This is a low-level routine that fetches a resource from the - metadata that starts at a given offset. The size parameter is - filled with the data field as encoded in the metadata. - - -

-
-
mono_image_get_table_info
- -
Prototype: mono_image_get_table_info
-

- -

-
-
mono_image_get_table_rows
- -
Prototype: mono_image_get_table_rows
-

- -

-
-
mono_image_is_dynamic
- -
gboolean -mono_image_is_dynamic (MonoImage *image) - -
-

-Parameters -

image:
the MonoImage
-Returns -
TRUE if the image was created dynamically, FALSE if not. -
-Remarks -

- Determines if the given image was created dynamically through the - System.Reflection.Emit API - - -

-
-
mono_image_loaded_by_guid
- -
Prototype: mono_image_loaded_by_guid
-

- -

-
-
mono_image_loaded
- -
MonoImage* -mono_image_loaded (const char *name) - -
-

-Parameters -

name:
name of the image to load
-Returns -
the loaded MonoImage, or NULL on failure. -
-Remarks -

- This routine ensures that the given image is loaded. - - -

-
-
mono_image_lookup_resource
- -
gpointer -mono_image_lookup_resource (MonoImage *image, guint32 res_id, guint32 lang_id, gunichar2 *name) - -
-

-Parameters -

image:
the image to look up the resource in
res_id:
A MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup.
lang_id:
The language id.
name:
the resource name to lookup.
-Returns -
NULL if not found, otherwise a pointer to the in-memory representation - - of the given resource. The caller should free it using g_free () when no longer - needed.
- -
-
-
mono_image_strerror
- -
const char * -mono_image_strerror (MonoImageOpenStatus status) - -
-

-Parameters -

status:
an code indicating the result from a recent operation
-Returns -
a string describing the error -
- - -

Public Keys, Strong Names and Certificates

- - -
-
mono_image_strong_name_position
- -
guint32 -mono_image_strong_name_position (MonoImage *image, guint32 *size) - -
-

-Parameters -

image:
a MonoImage
size:
a guint32 pointer, or NULL.
-Returns -
the position within the image file where the strong name - - is stored.
-Remarks -

- If the image has a strong name, and size is not NULL, the value - pointed to by size will have the size of the strong name. - - -

-
-
mono_image_get_public_key
- -
const char* -mono_image_get_public_key (MonoImage *image, guint32 *size) - -
-

-Parameters -

image:
a MonoImage
size:
a guint32 pointer, or NULL.
-Returns -
NULL if the image does not have a public key, or a pointer - - to the public key.
-Remarks -

- This is used to obtain the public key in the image. - -

- If the image has a public key, and size is not NULL, the value - pointed to by size will have the size of the public key. - -

- -

-
-
mono_image_get_strong_name
- -
const char* -mono_image_get_strong_name (MonoImage *image, guint32 *size) - -
-

-Parameters -

image:
a MonoImage
size:
a guint32 pointer, or NULL.
-Returns -
NULL if the image does not have a strong name, or a - - pointer to the public key.
-Remarks -

- If the image has a strong name, and size is not NULL, the value - pointed to by size will have the size of the strong name. - - -

-
-
mono_image_has_authenticode_entry
- -
gboolean -mono_image_has_authenticode_entry (MonoImage *image) - -
-

-Parameters -

image:
the MonoImage
-Returns -
TRUE if the image contains an authenticode entry in the PE - - directory.
-Remarks -

- Use this routine to determine if the image has a Authenticode - Certificate Table. - - - -

Low-level features

- - -
-
mono_image_rva_map
- -
Prototype: mono_image_rva_map
-

- -

-
-
mono_image_ensure_section_idx
- -
int -mono_image_ensure_section_idx (MonoImage *image, int section) - -
-

-Parameters -

image:
The image we are operating on
section:
section number that we will load/map into memory
-Returns -
TRUE on success -
-Remarks -

- This routine makes sure that we have an in-memory copy of - an image section (.text, .rsrc, .data). - - -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-internal.html b/docs/deploy/mono-api-internal.html deleted file mode 100644 index ddd03e3771..0000000000 --- a/docs/deploy/mono-api-internal.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - mono-api-internal.html - - - -

Mono Internals

- -

This section documents some of the internal APIs used - inside Mono that developers extending or altering Mono might - want to use. - -

Marshalling functions

- - -
-
mono_marshal_alloc
- -
Prototype: mono_marshal_alloc
-

- -

-
-
mono_marshal_asany
- -
Prototype: mono_marshal_asany
-

- -

-
-
mono_marshal_free_array
- -
Prototype: mono_marshal_free_array
-

- -

-
-
mono_marshal_free_asany
- -
Prototype: mono_marshal_free_asany
-

- -

-
-
mono_marshal_free
- -
Prototype: mono_marshal_free
-

- -

-
-
mono_marshal_get_castclass
- -
Prototype: mono_marshal_get_castclass
-

- -

-
-
mono_marshal_get_delegate_begin_invoke
- -
Prototype: mono_marshal_get_delegate_begin_invoke
-

- -

-
-
mono_marshal_get_delegate_end_invoke
- -
Prototype: mono_marshal_get_delegate_end_invoke
-

- -

-
-
mono_marshal_get_delegate_invoke
- -
Prototype: mono_marshal_get_delegate_invoke
-

- -

-
-
mono_marshal_get_icall_wrapper
- -
Prototype: mono_marshal_get_icall_wrapper
-

- -

-
-
mono_marshal_get_isinst
- -
Prototype: mono_marshal_get_isinst
-

- -

-
-
mono_marshal_get_ldfld_remote_wrapper
- -
Prototype: mono_marshal_get_ldfld_remote_wrapper
-

- -

-
-
mono_marshal_get_ldfld_wrapper
- -
Prototype: mono_marshal_get_ldfld_wrapper
-

- -

-
-
mono_marshal_get_managed_wrapper
- -
Prototype: mono_marshal_get_managed_wrapper
-

- -

-
-
mono_marshal_get_native_wrapper
- -
MonoMethod* -mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, gboolean aot) - -
-

-Parameters -

method:
The MonoMethod to wrap.
check_exceptions:
Whenever to check for pending exceptions
-Remarks -

- generates IL code for the pinvoke wrapper (the generated method - calls the unmanaged code in piinfo->addr) - The wrapper info for the wrapper is a WrapperInfo structure. - -

-
-
mono_marshal_get_proxy_cancast
- -
Prototype: mono_marshal_get_proxy_cancast
-

- -

-
-
mono_marshal_get_ptr_to_struct
- -
MonoMethod* -mono_marshal_get_ptr_to_struct (MonoClass *klass) - -
-

-Parameters -

klass:
-Remarks -

- generates IL code for PtrToStructure (IntPtr src, object structure) - The wrapper info for the wrapper is a WrapperInfo structure. - -

-
-
mono_marshal_get_remoting_invoke_for_target
- -
Prototype: mono_marshal_get_remoting_invoke_for_target
-

- -

-
-
mono_marshal_get_remoting_invoke
- -
Prototype: mono_marshal_get_remoting_invoke
-

- -

-
-
mono_marshal_get_remoting_invoke_with_check
- -
Prototype: mono_marshal_get_remoting_invoke_with_check
-

- -

-
-
mono_marshal_get_runtime_invoke
- -
Prototype: mono_marshal_get_runtime_invoke
-

- -

-
-
mono_marshal_get_stelemref
- -
Prototype: mono_marshal_get_stelemref
-

- -

-
-
mono_marshal_get_stfld_remote_wrapper
- -
Prototype: mono_marshal_get_stfld_remote_wrapper
-

- -

-
-
mono_marshal_get_stfld_wrapper
- -
Prototype: mono_marshal_get_stfld_wrapper
-

- -

-
-
mono_marshal_get_struct_to_ptr
- -
MonoMethod* -mono_marshal_get_struct_to_ptr (MonoClass *klass) - -
-

-Parameters -

klass:
-Remarks -

- generates IL code for StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld) - The wrapper info for the wrapper is a WrapperInfo structure. - -

-
-
mono_marshal_get_synchronized_wrapper
- -
Prototype: mono_marshal_get_synchronized_wrapper
-

- -

-
-
mono_marshal_get_unbox_wrapper
- -
Prototype: mono_marshal_get_unbox_wrapper
-

- -

-
-
mono_marshal_get_xappdomain_invoke
- -
Prototype: mono_marshal_get_xappdomain_invoke
-

- -

-
-
mono_marshal_load_type_info
- -
MonoMarshalType* -mono_marshal_load_type_info (MonoClass* klass) - -
-

-Remarks -

- Initialize klass->marshal_info using information from metadata. This function can - recursively call itself, and the caller is responsible to avoid that by calling - mono_marshal_is_loading_type_info () beforehand. - - LOCKING: Acquires the loader lock. - -

-
-
mono_marshal_method_from_wrapper
- -
Prototype: mono_marshal_method_from_wrapper
-

- -

-
-
mono_marshal_realloc
- -
Prototype: mono_marshal_realloc
-

- -

-
-
mono_marshal_set_last_error
- -
void -mono_marshal_set_last_error (void) - -
-

-Remarks -

- This function is invoked to set the last error value from a P/Invoke call - which has SetLastError set. - -

-
-
mono_marshal_type_size
- -
Prototype: mono_marshal_type_size
-

- - -

Metadata Loading Errors

- -

The routines in this section are used to cope with errors - during metadata loading. Errors in metadata handling can - happen for many reason, and these include (this is not an - exhaustive list). - -

- -

The mono_loader_set_* routines are invoked during - metadata loading to flag that an error has happened. The - class loading errros are flagged in a per-thread basis. - -

In various spots in the runtime the - mono_loader_get_last_error routine is called to check - if there was a problem, and then errors are propagated upwards - on the stack until we reach a point where an exception can be - raised and no runtime locks are held. - -

The mono_loader_error_prepare_exception takes a - MonoLoaderError structure (the value returned from - mono_loader_get_last_error), turns that into an - exception and clears the error condition from the current - thread. - - -

-
mono_loader_set_error_field_load
- -
Prototype: mono_loader_set_error_field_load
-

- -

-
-
mono_loader_set_error_method_load
- -
Prototype: mono_loader_set_error_method_load
-

- -

-
-
mono_loader_set_error_type_load
- -
void -mono_loader_set_error_type_load (const char *class_name, const char *assembly_name) - -
-

-Remarks -

- Set the loader error for this thread. - - -

-
-
mono_loader_get_last_error
- -
Prototype: mono_loader_get_last_error
-

- -

-
-
mono_loader_clear_error
- -
void -mono_loader_clear_error (void) - -
-

-Remarks -

- Disposes any loader error messages on this thread - -

-
-
mono_loader_error_prepare_exception
- -
MonoException* -mono_loader_error_prepare_exception (MonoLoaderError *error) - -
-

-Parameters -

error:
The MonoLoaderError to turn into an exception
-Remarks -

- This turns a MonoLoaderError into an exception that can be thrown - and resets the Mono Loader Error state during this process. - - - -

Metadata Loader Locking: Internals

- -

The locking functions here are used by code in class.c and - metadata.c to lock access to the shared hashtables inside the - MonoImage. - - -

-
mono_loader_lock
- -
void -mono_loader_lock (void) - -
-

-Remarks -

- See docs/thread-safety.txt for the locking strategy. - -

-
-
mono_loader_unlock
- -
Prototype: mono_loader_unlock
-

- - -

Garbage Collector Internal Interface

- -

The internal interface of the Mono GC is the interface used - between the runtime engine and the garbage collector. - - -

-
mono_gc_disable
- -
Prototype: mono_gc_disable
-

- -

-
-
mono_gc_enable
- -
Prototype: mono_gc_enable
-

- -

-
-
mono_gc_is_finalizer_thread
- -
gboolean -mono_gc_is_finalizer_thread (MonoThread *thread) - -
-

-Parameters -

thread:
the thread to test.
-Remarks -

- In Mono objects are finalized asynchronously on a separate thread. - This routine tests whether the thread argument represents the - finalization thread. - -

- Returns true if thread is the finalization thread. - -

-
-
mono_gc_out_of_memory
- -
Prototype: mono_gc_out_of_memory
-

- -

-
-
mono_gc_start_world
- -
Prototype: mono_gc_start_world
-

- -

-
-
mono_gc_stop_world
- -
Prototype: mono_gc_stop_world
-

- -

-
-
mono_gc_alloc_fixed
- -
Prototype: mono_gc_alloc_fixed
-

- -

-
-
mono_gc_enable_events
- -
Prototype: mono_gc_enable_events
-

- -

-
-
mono_gc_free_fixed
- -
Prototype: mono_gc_free_fixed
-

- -

-
-
mono_gc_make_descr_from_bitmap
- -
Prototype: mono_gc_make_descr_from_bitmap
-

- - - -

-
-
mono_gc_base_init
- -
Prototype: mono_gc_base_init
-

- -

-
-
mono_gc_invoke_finalizers
- -
Prototype: mono_gc_invoke_finalizers
-

- -

-
-
mono_gc_is_gc_thread
- -
Prototype: mono_gc_is_gc_thread
-

- -

-
-
mono_gc_pending_finalizers
- -
Prototype: mono_gc_pending_finalizers
-

- -

-
-
mono_gc_register_thread
- -
Prototype: mono_gc_register_thread
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-jit.html b/docs/deploy/mono-api-jit.html deleted file mode 100644 index 471c46cc84..0000000000 --- a/docs/deploy/mono-api-jit.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - mono-api-jit.html - - - -

Synopsis

- -
-G_GNUC_UNUSED char * mono_pmip (void *ip); -void mono_print_method_from_ip (void *ip); - -void mono_threads_request_thread_dump (void); - - -
- -

Useful Debugging Functions

- -

These functions are useful when running the Mono VM inside - a debugger. - - -

-
mono_pmip
- -
G_GNUC_UNUSED char * -mono_pmip (void *ip) - -
-

-Parameters -

ip:
an instruction pointer address
-Returns -
the name of the method at address ip. -
-Remarks -

- This method is used from a debugger to get the name of the - method at address ip. This routine is typically invoked from - a debugger like this: - - (gdb) print mono_pmip ($pc) - - -

-
-
mono_print_method_from_ip
- -
#ifdef __GNUC__ -/* Prevent the linker from optimizing this away in embedding setups to help debugging */ - __attribute__((used)) -#endif -void -mono_print_method_from_ip (void *ip) - -
-

-Parameters -

ip:
an instruction pointer address
-Remarks -

- This method is used from a debugger to get the name of the - method at address ip. - - This prints the name of the method at address ip in the standard - output. Unlike mono_pmip which returns a string, this routine - prints the value on the standard output. - -

-
-
mono_print_thread_dump
- -
Prototype: mono_print_thread_dump
-

- -

-
-
mono_threads_request_thread_dump
- -
void -mono_threads_request_thread_dump (void) - -
-

-Remarks -

- Ask all threads except the current to print their stacktrace to stdout. - - -

Helper Tools For Native Ports

- - - -
\ No newline at end of file diff --git a/docs/deploy/mono-api-jitinternal.html b/docs/deploy/mono-api-jitinternal.html deleted file mode 100644 index 476c9d7f9f..0000000000 --- a/docs/deploy/mono-api-jitinternal.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - mono-api-jitinternal.html - - - -

Notification Interface

- -

This is an internal profiler interface. In general, users - would not be using this interface, but would be using the - profiler interface. - -

These methods must be called to notify the profiler of an - event that must be recorded. Mono's JIT engine currently - calls these routines, but if you are extending Mono in some - way these are the methods that you might invoke to notify the - profiler of an event. - - -

-
mono_profiler_load
- -
void -mono_profiler_load (const char *desc) - -
-

-Parameters -

desc:
arguments to configure the profiler
-Remarks -

- Invoke this method to initialize the profiler. This will drive the - loading of the internal ("default") or any external profilers. - - This routine is invoked by Mono's driver, but must be called manually - if you embed Mono into your application. - -

-
-
mono_profiler_allocation
- -
Prototype: mono_profiler_allocation
-

- -

-
-
mono_profiler_stat_hit
- -
Prototype: mono_profiler_stat_hit
-

- -

-
-
mono_profiler_thread_start
- -
Prototype: mono_profiler_thread_start
-

- -

-
-
mono_profiler_thread_end
- -
Prototype: mono_profiler_thread_end
-

- -

-
-
mono_profiler_appdomain_event
- -
Prototype: mono_profiler_appdomain_event
-

- -

-
-
mono_profiler_appdomain_loaded
- -
Prototype: mono_profiler_appdomain_loaded
-

- -

-
-
mono_profiler_assembly_event
- -
Prototype: mono_profiler_assembly_event
-

- -

-
-
mono_profiler_assembly_loaded
- -
Prototype: mono_profiler_assembly_loaded
-

- -

-
-
mono_profiler_class_event
- -
Prototype: mono_profiler_class_event
-

- -

-
-
mono_profiler_class_loaded
- -
Prototype: mono_profiler_class_loaded
-

- -

-
-
mono_profiler_code_transition
- -
Prototype: mono_profiler_code_transition
-

- -

-
-
mono_profiler_method_end_jit
- -
Prototype: mono_profiler_method_end_jit
-

- -

-
-
mono_profiler_method_enter
- -
Prototype: mono_profiler_method_enter
-

- -

-
-
mono_profiler_method_jit
- -
Prototype: mono_profiler_method_jit
-

- -

-
-
mono_profiler_method_leave
- -
Prototype: mono_profiler_method_leave
-

- -

-
-
mono_profiler_module_event
- -
Prototype: mono_profiler_module_event
-

- -

-
-
mono_profiler_module_loaded
- -
Prototype: mono_profiler_module_loaded
-

- -

-
-
mono_profiler_shutdown
- -
Prototype: mono_profiler_shutdown
-

- -

-
-
mono_profiler_startup
- -
Prototype: mono_profiler_startup
-

- -

-
-
mono_profiler_gc_event
- -
Prototype: mono_profiler_gc_event
-

- -

-
-
mono_profiler_gc_heap_resize
- -
Prototype: mono_profiler_gc_heap_resize
-

- -

-
-
mono_profiler_gc_event
- -
Prototype: mono_profiler_gc_event
-

- -

-
-
mono_profiler_gc_heap_resize
- -
Prototype: mono_profiler_gc_heap_resize
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-marshal.html b/docs/deploy/mono-api-marshal.html deleted file mode 100644 index 22d1b8f898..0000000000 --- a/docs/deploy/mono-api-marshal.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - mono-api-marshal.html - - - - - - -
-
mono_delegate_free_ftnptr
- -
Prototype: mono_delegate_free_ftnptr
-

- -

-
-
mono_delegate_to_ftnptr
- -
Prototype: mono_delegate_to_ftnptr
-

- -

-
-
mono_ftnptr_to_delegate
- -
Prototype: mono_ftnptr_to_delegate
-

- -

- -
\ No newline at end of file diff --git a/docs/deploy/mono-api-metadata.html b/docs/deploy/mono-api-metadata.html deleted file mode 100644 index 39d59d5d88..0000000000 --- a/docs/deploy/mono-api-metadata.html +++ /dev/null @@ -1,1313 +0,0 @@ - - - - mono-api-metadata.html - - - -

Metadata Reading

- -

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. - -

Managed developers access this information using either the - System.Reflection API or a library - like Cecil. - -

To start using the Metadata API it is necessary - to open an - assembly or a CIL image (a .dll or .exe file) using one of - the - CIL image - opening API calls. - -

Metadata Heaps

- -

ECMA CLI images contain four heaps that store different - kinds of information, these are: - -

- -

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 Metadata Tables. - - -

-
mono_metadata_guid_heap
- -
const char * -mono_metadata_guid_heap (MonoImage *meta, guint32 index) - -
-

-Parameters -

meta:
metadata context
index:
index into the guid heap.
-Returns -
an in-memory pointer to the index in the guid heap. -
- -
-
-
mono_metadata_string_heap
- -
const char * -mono_metadata_string_heap (MonoImage *meta, guint32 index) - -
-

-Parameters -

meta:
metadata context
index:
index into the string heap.
-Returns -
an in-memory pointer to the index in the string heap. -
- -
-
-
mono_metadata_blob_heap
- -
const char * -mono_metadata_blob_heap (MonoImage *meta, guint32 index) - -
-

-Parameters -

meta:
metadata context
index:
index into the blob.
-Returns -
an in-memory pointer to the index in the Blob heap. -
- -
-
-
mono_metadata_user_string
- -
const char * -mono_metadata_user_string (MonoImage *meta, guint32 index) - -
-

-Parameters -

meta:
metadata context
index:
index into the user string heap.
-Returns -
an in-memory pointer to the index in the user string heap ("US"). -
- -
-
-
mono_metadata_decode_blob_size
- -
guint32 -mono_metadata_decode_blob_size (const char *xptr, const char **rptr) - -
-

-Parameters -

ptr:
pointer to a blob object
rptr:
the new position of the pointer
-Returns -
the size of the blob object -
-Remarks -

- This decodes a compressed size as described by 23.1.4 (a blob or user string object) - - - - -

Metadata Tables

- -

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: - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ECMA CLI Table Name - - C Constant Name - - Table Schema (Array Size + Columns Constants) -
AssemblyMONO_TABLE_ASSEMBLY -Array size: -MONO_ASSEMBLY_SIZE -
    -
  • MONO_ASSEMBLY_HASH_ALG -
  • MONO_ASSEMBLY_MAJOR_VERSION -
  • MONO_ASSEMBLY_MINOR_VERSION -
  • MONO_ASSEMBLY_BUILD_NUMBER -
  • MONO_ASSEMBLY_REV_NUMBER -
  • MONO_ASSEMBLY_FLAGS -
  • MONO_ASSEMBLY_PUBLIC_KEY -
  • MONO_ASSEMBLY_NAME -
  • MONO_ASSEMBLY_CULTURE -
-
AssemblyOSMONO_TABLE_ASSEMBLYOS -Array size: -MONO_ASSEMBLYOS_SIZE -
    -
  • MONO_ASSEMBLYOS_PLATFORM -
  • MONO_ASSEMBLYOS_MAJOR_VERSION -
  • MONO_ASSEMBLYOS_MINOR_VERSION -
-
AssemblyProcessorMONO_TABLE_ASSEMBLYPROCESSORArray -size: MONO_ASSEMBLYPROCESSOR_SIZE -
    -
  • MONO_ASSEMBLY_PROCESSOR -
-
AssemblyRefMONO_TABLE_ASSEMBLYREF -Array size: -MONO_ASSEMBLYREF_SIZE -
    -
  • MONO_ASSEMBLYREF_MAJOR_VERSION -
  • MONO_ASSEMBLYREF_MINOR_VERSION -
  • MONO_ASSEMBLYREF_BUILD_NUMBER -
  • MONO_ASSEMBLYREF_REV_NUMBER -
  • MONO_ASSEMBLYREF_FLAGS -
  • MONO_ASSEMBLYREF_PUBLIC_KEY -
  • MONO_ASSEMBLYREF_NAME -
  • MONO_ASSEMBLYREF_CULTURE -
  • MONO_ASSEMBLYREF_HASH_VALUE -
-
AssemblyRefProcessorMONO_TABLE_ASSEMBLYREFPROCESSORArray -size: MONO_ASSEMBLYREFPROC_SIZE -
    -
  • MONO_ASSEMBLYREFPROC_PROCESSOR -
  • MONO_ASSEMBLYREFPROC_ASSEMBLYREF -
-
AssemblyRefOSMONO_TABLE_ASSEMBLYREFOS -Array size: -
  • MONO_ASSEMBLYREFOS_SIZE -
      -
    • MONO_ASSEMBLYREFOS_PLATFORM -
    • MONO_ASSEMBLYREFOS_MAJOR_VERSION -
    • MONO_ASSEMBLYREFOS_MINOR_VERSION -
    • MONO_ASSEMBLYREFOS_ASSEMBLYREF -
    -
  • ClassLayoutMONO_TABLE_CLASSLAYOUT -Array size: -MONO_CLASSLAYOUT_SIZE -
      -
    • MONO_CLASS_LAYOUT_PACKING_SIZE -
    • MONO_CLASS_LAYOUT_CLASS_SIZE -
    • MONO_CLASS_LAYOUT_PARENT -
    -
    ConstantMONO_TABLE_CONSTANT -Array size: -MONO_CONSTANT_SIZE -
      -
    • MONO_CONSTANT_TYPE -
    • MONO_CONSTANT_PADDING -
    • MONO_CONSTANT_PARENT -
    • MONO_CONSTANT_VALUE -
    -
    CustomAttributeMONO_TABLE_CUSTOMATTRIBUTE -Array size: -MONO_CUSTOM_ATTR_SIZE -
      -
    • MONO_CUSTOM_ATTR_PARENT -
    • MONO_CUSTOM_ATTR_TYPE -
    • MONO_CUSTOM_ATTR_VALUE -
    -
    DeclSecurityMONO_TABLE_DECLSECURITY -Array size: -MONO_DECL_SECURITY_SIZE -
      -
    • MONO_DECL_SECURITY_ACTION -
    • MONO_DECL_SECURITY_PARENT -
    • MONO_DECL_SECURITY_PERMISSIONSET -
    -
    EventMapMONO_TABLE_EVENTMAP -Array size: -MONO_EVENT_MAP_SIZE -
      -
    • MONO_EVENT_MAP_PARENT -
    • MONO_EVENT_MAP_EVENTLIST -
    -
    EventPtrMONO_TABLE_EVENT_POINTER -Array size: -MONO_EVENT_POINTER_SIZE -
      -
    • MONO_EVENT_POINTER_EVENT -
    -
    EventMONO_TABLE_EVENT -Array size: MONO_EVENT_SIZE -
      -
    • MONO_EVENT_FLAGS -
    • MONO_EVENT_NAME -
    • MONO_EVENT_TYPE -
    -
    ExportedTypeMONO_TABLE_EXPORTEDTYPE -Array size: -MONO_EXPORTEDTYPE_SIZE -
      -
    • MONO_EXP_TYPE_FLAGS -
    • MONO_EXP_TYPE_TYPEDEF -
    • MONO_EXP_TYPE_NAME -
    • MONO_EXP_TYPE_NAMESPACE -
    • MONO_EXP_TYPE_IMPLEMENTATION -
    -
    FieldMONO_TABLE_FIELD -Array size: MONO_FIELD_SIZE -
      -
    • MONO_FIELD_FLAGS -
    • MONO_FIELD_NAME -
    • MONO_FIELD_SIGNATURE -
    -
    FieldLayouttMONO_TABLE_FIELDLAYOUT -Array size: -MONO_FIELDLAYOUT_SIZE -
      -
    • MONO_FIELD_LAYOUT_OFFSET -
    • MONO_FIELD_LAYOUT_FIELD -
    -
    FieldMarshalMONO_TABLE_FIELDMARSHAL -Array size: -MONO_FIELD_MARSHAL_SIZE -
      -
    • MONO_FIELD_MARSHAL_PARENT -
    • MONO_FIELD_MARSHAL_NATIVE_TYPE -
    -
    FieldPtrMONO_TABLE_FIELD_POINTER -Array size: -MONO_FIELD_POINTER_SIZE -
      -
    • MONO_FIELD_POINTER_FIELD -
    -
    FieldRVAMONO_TABLE_FIELDRVA -Array size: -MONO_FIELDRVA_SIZE -
      -
    • MONO_FIELD_RVA_RVA -
    • MONO_FIELD_RVA_FIELD -
    -
    FileMONO_TABLE_FILE -Array size: MONO_FILE_SIZE -
      -
    • MONO_FILE_FLAGS -
    • MONO_FILE_NAME -
    • MONO_FILE_HASH_VALUE -
    -
    GenericParamMONO_TABLE_GENERICPARAM -Array size: -MONO_GENERICPARAM_SIZE -
      -
    • MONO_GENERICPARAM_NUMBER -
    • MONO_GENERICPARAM_FLAGS -
    • MONO_GENERICPARAM_OWNER -
    • MONO_GENERICPARAM_NAME -
    -
    GenericParamConstraintMONO_TABLE_GENERICPARAMCONSTRAINTArray -size: MONO_GENERICPARAMCONSTRAINT_SIZE -
      -
    • MONO_GENPARCONSTRAINT_GENERICPAR -
    • MONO_GENPARCONSTRAINT_CONSTRAINT -
    -
    ImplMapMONO_TABLE_IMPLMAP -Array size: -MONO_IMPLMAP_SIZE -
      -
    • MONO_IMPLMAP_FLAGS -
    • MONO_IMPLMAP_MEMBER -
    • MONO_IMPLMAP_NAME -
    • MONO_IMPLMAP_SCOPE -
    -
    InterfaceImplMONO_TABLE_INTERFACEIMPL -Array size: -
  • MONO_INTERFACEIMPL_SIZE -
      -
    • MONO_INTERFACEIMPL_CLASS -
    • MONO_INTERFACEIMPL_INTERFACE -
    -
  • ManifestResourceMONO_TABLE_MANIFESTRESOURCEArray -size: MONO_MANIFESTRESOURCE_SIZE -
      -
    • MONO_MANIFEST_OFFSET -
    • MONO_MANIFEST_FLAGS -
    • MONO_MANIFEST_NAME -
    • MONO_MANIFEST_IMPLEMENTATION -
    -
    MemberRefMONO_TABLE_MEMBERREF -Array size: -MONO_MEMBERREF_SIZE -
      -
    • MONO_MEMBERREF_CLASS -
    • MONO_MEMBERREF_NAME -
    • MONO_MEMBERREF_SIGNATURE -
    -
    MethodImplMONO_TABLE_METHODIMPL -Array size: -MONO_METHODIMPL_SIZE -
      -
    • MONO_METHODIMPL_CLASS -
    • MONO_METHODIMPL_BODY -
    • MONO_METHODIMPL_DECLARATION -
    -
    MethodSpecMONO_TABLE_METHODSPEC -Array size: -MONO_METHODSPEC_SIZE -
      -
    • MONO_METHODSPEC_METHOD -
    • MONO_METHODSPEC_SIGNATURE -
    -
    MethodSemanticsMONO_TABLE_METHODSEMANTICSArray -size: MONO_METHOD_SEMA_SIZE -
      -
    • MONO_METHOD_SEMA_SEMANTICS -
    • MONO_METHOD_SEMA_METHOD -
    • MONO_METHOD_SEMA_ASSOCIATION -
    -
    ModulerefMONO_TABLE_MODULEREF -Array size: -MONO_MODULEREF_SIZE -
      -
    • MONO_MODULEREF_NAME -
    -
    ModuleMONO_TABLE_MODULE -Array size: -MONO_MODULE_SIZE -
    -Columns: -
      -
    • MONO_MODULE_GENERATION -
    • MONO_MODULE_NAME -
    • MONO_MODULE_MVID -
    • MONO_MODULE_ENC -
    • MONO_MODULE_ENCBASE -
    -
    TypeRefMONO_TABLE_TYPEREF -Array size: -MONO_TYPEREF_SIZE -
      -
    • MONO_TYPEREF_SCOPE -
    • MONO_TYPEREF_NAME -
    • MONO_TYPEREF_NAMESPACE -
    -
    MethodPtrMONO_TABLE_METHOD_POINTER -Array size: -MONO_METHOD_POINTER_SIZE -
      -
    • MONO_METHOD_POINTER_METHOD -
    -
    MethodMONO_TABLE_METHOD -Array size: -MONO_METHOD_SIZE -
      -
    • MONO_METHOD_RVA -
    • MONO_METHOD_IMPLFLAGS -
    • MONO_METHOD_FLAGS -
    • MONO_METHOD_NAME -
    • MONO_METHOD_SIGNATURE -
    • MONO_METHOD_PARAMLIST -
    -
    NestedClassMONO_TABLE_NESTEDCLASS -Array size: -MONO_NESTEDCLASS_SIZE -
      -
    • MONO_NESTED_CLASS_NESTED -
    • MONO_NESTED_CLASS_ENCLOSING -
    -
    ParamPtrMONO_TABLE_PARAM_POINTER -Array size: -MONO_PARAM_POINTER_SIZE -
      -
    • MONO_PARAM_POINTER_PARAM -
    -
    ParamMONO_TABLE_PARAM -Array size: MONO_PARAM_SIZE -
      -
    • MONO_PARAM_FLAGS -
    • MONO_PARAM_SEQUENCE -
    • MONO_PARAM_NAME -
    -
    PropertyMapMONO_TABLE_PROPERTYMAP -Array size: -MONO_PROPERTY_MAP_SIZE -
      -
    • MONO_PROPERTY_MAP_PARENT -
    • MONO_PROPERTY_MAP_PROPERTY_LIST -
    -
    PropertyPtrMONO_TABLE_PROPERTY_POINTERArray -size: MONO_PROPERTY_POINTER_SIZE -
      -
    • MONO_PROPERTY_POINTER_PROPERTY -
    -
    PropertyMONO_TABLE_PROPERTY -Array size: -MONO_PROPERTY_SIZE -
      -
    • MONO_PROPERTY_FLAGS -
    • MONO_PROPERTY_NAME -
    • MONO_PROPERTY_TYPE -
    -
    StandaloneSigMONO_TABLE_STANDALONESIG -Array size: -
  • MONO_STAND_ALONE_SIGNATURE_SIZE -
      -
    • MONO_STAND_ALONE_SIGNATURE -
    -
  • TypeDefMONO_TABLE_TYPEDEF -Array size: -MONO_TYPEDEF_SIZE -
      -
    • MONO_TYPEDEF_FLAGS -
    • MONO_TYPEDEF_NAME -
    • MONO_TYPEDEF_NAMESPACE -
    • MONO_TYPEDEF_EXTENDS -
    • MONO_TYPEDEF_FIELD_LIST -
    • MONO_TYPEDEF_METHOD_LIST -
    -
    TypeSpecMONO_TABLE_TYPESPEC -Array size: -MONO_TYPESPEC_SIZE -
      -
    • MONO_TYPESPEC_SIGNATURE -
    -
    -
    - -

    Each table can contain zero or more rows, you must call the - mono_metadata_table_rows - to obtain the number of rows in a table, and then you can - extract individual row values by using - the mono_metadata_decode_row - or - the mono_metadata_decode_row_col. - When decoding rows you must provide an guint32 array large - enough to hold as many columns as the table contains. - -

    The metadata tables are stored in the MonoImage, you obtain - a pointer to the MonoTableInfo by calling - the mono_image_get_table_info - and then you can scan those tables, for example: - -

    -	/*
    -	 * 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]));
    -		}
    -	}
    -	
    - -

    The above program shows the following output when ran on - the C# compiler: - -

    -	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
    -	
    - -

    - -

    Metadata Tables API

    - -

    These are the APIs for dealing with tables: - - -

    -
    mono_image_get_table_info
    - -
    Prototype: mono_image_get_table_info
    -

    - -

    -
    -
    mono_image_get_table_rows
    - -
    Prototype: mono_image_get_table_rows
    -

    - -

    -
    -
    mono_metadata_get_table
    - -
    Prototype: mono_metadata_get_table
    -

    - -

    -
    -
    mono_metadata_decode_row_col
    - -
    guint32 -mono_metadata_decode_row_col (const MonoTableInfo *t, int idx, guint col) - -
    -

    -Parameters -

    t:
    table to extract information from.
    idx:
    index for row in table.
    col:
    column in the row.
    -Remarks -

    - This function returns the value of column col from the idx - row in the table t. - -

    -
    -
    mono_metadata_decode_row
    - -
    void -mono_metadata_decode_row (const MonoTableInfo *t, int idx, guint32 *res, int res_size) - -
    -

    -Parameters -

    t:
    table to extract information from.
    idx:
    index in table.
    res:
    array of res_size cols to store the results in
    -Remarks -

    - This decompresses the metadata element idx in table t - into the guint32 res array that has res_size elements - -

    -
    -
    mono_metadata_compute_size
    - -
    Prototype: mono_metadata_compute_size
    -

    - -

    -
    -
    mono_metadata_custom_attrs_from_index
    - -
    Prototype: mono_metadata_custom_attrs_from_index
    -

    - -

    -
    -
    mono_metadata_decode_signed_value
    - -
    gint32 -mono_metadata_decode_signed_value (const char *ptr, const char **rptr) - -
    -

    -Parameters -

    ptr:
    pointer to decode from
    rptr:
    the new position of the pointer
    -Returns -
    the decoded value -
    -Remarks -

    - This routine decompresses 32-bit signed values - (not specified in the spec) - - -

    -
    -
    mono_metadata_decode_value
    - -
    guint32 -mono_metadata_decode_value (const char *_ptr, const char **rptr) - -
    -

    -Parameters -

    ptr:
    pointer to decode from
    rptr:
    the new position of the pointer
    -Returns -
    the decoded value -
    -Remarks -

    - This routine decompresses 32-bit values as specified in the "Blob and - Signature" section (22.2) - - -

    -
    -
    mono_metadata_encode_value
    - -
    Prototype: mono_metadata_encode_value
    -

    - - -

    Metadata access API

    - -

    This is the low-level API for accessing the metadata - images. - - -

    -
    mono_cli_rva_image_map
    - -
    Prototype: mono_cli_rva_image_map
    -

    - -

    -
    -
    mono_pe_file_open
    - -
    MonoImage* -mono_pe_file_open (const char *fname, MonoImageOpenStatus *status) - -
    -

    -Parameters -

    fname:
    filename that points to the module we want to open
    status:
    An error condition is returned in this field
    -Returns -
    An open image of type %MonoImage or NULL on error. if - - NULL, then check the value of status 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.
    - -
    -
    -
    mono_metadata_events_from_typedef
    - -
    Prototype: mono_metadata_events_from_typedef
    -

    - -

    -
    -
    mono_metadata_field_info
    - -
    Prototype: mono_metadata_field_info
    -

    - -

    -
    -
    mono_metadata_free_array
    - -
    Prototype: mono_metadata_free_array
    -

    - -

    -
    -
    mono_metadata_free_marshal_spec
    - -
    Prototype: mono_metadata_free_marshal_spec
    -

    - -

    -
    -
    mono_metadata_free_mh
    - -
    Prototype: mono_metadata_free_mh
    -

    - -

    -
    -
    mono_metadata_free_type
    - -
    Prototype: mono_metadata_free_type
    -

    - -

    -
    -
    mono_metadata_get_constant_index
    - -
    Prototype: mono_metadata_get_constant_index
    -

    - -

    -
    -
    mono_metadata_get_marshal_info
    - -
    Prototype: mono_metadata_get_marshal_info
    -

    - -

    -
    -
    mono_metadata_implmap_from_method
    - -
    Prototype: mono_metadata_implmap_from_method
    -

    - -

    -
    -
    mono_metadata_interfaces_from_typedef
    - -
    Prototype: mono_metadata_interfaces_from_typedef
    -

    - -

    -
    -
    mono_metadata_locate
    - -
    const char * -mono_metadata_locate (MonoImage *meta, int table, int idx) - -
    -

    -Parameters -

    meta:
    metadata context
    table:
    table code.
    idx:
    index of element to retrieve from table.
    -Returns -
    a pointer to the idx element in the metadata table - - whose code is table.
    - -
    -
    -
    mono_metadata_locate_token
    - -
    const char * -mono_metadata_locate_token (MonoImage *meta, guint32 token) - -
    -

    -Parameters -

    meta:
    metadata context
    token:
    metadata token
    -Returns -
    a pointer to the data in the metadata represented by the - - token token.
    - -
    -
    -
    mono_metadata_methods_from_event
    - -
    Prototype: mono_metadata_methods_from_event
    -

    - -

    -
    -
    mono_metadata_methods_from_property
    - -
    Prototype: mono_metadata_methods_from_property
    -

    - -

    -
    -
    mono_metadata_nested_in_typedef
    - -
    Prototype: mono_metadata_nested_in_typedef
    -

    - -

    -
    -
    mono_metadata_nesting_typedef
    - -
    Prototype: mono_metadata_nesting_typedef
    -

    - -

    -
    -
    mono_metadata_packing_from_typedef
    - -
    Prototype: mono_metadata_packing_from_typedef
    -

    - -

    -
    -
    mono_metadata_properties_from_typedef
    - -
    Prototype: mono_metadata_properties_from_typedef
    -

    - -

    -
    -
    mono_metadata_token_from_dor
    - -
    Prototype: mono_metadata_token_from_dor
    -

    - -

    -
    -
    mono_metadata_typedef_from_field
    - -
    guint32 -mono_metadata_typedef_from_field (MonoImage *meta, guint32 index) - -
    -

    -Parameters -

    meta:
    metadata context
    index:
    FieldDef token
    -Returns -
    the 1-based index into the TypeDef table of the type that - - declared the field described by index, or 0 if not found.
    - -
    -
    -
    mono_metadata_typedef_from_method
    - -
    Prototype: mono_metadata_typedef_from_method
    -

    - -

    -
    -
    mono_metadata_type_equal
    - -
    Prototype: mono_metadata_type_equal
    -

    - -

    -
    -
    mono_metadata_type_hash
    - -
    Prototype: mono_metadata_type_hash
    -

    - -

    -
    -
    mono_metadata_declsec_from_index
    - -
    Prototype: mono_metadata_declsec_from_index
    -

    - -

    -
    -
    mono_metadata_free_method_signature
    - -
    Prototype: mono_metadata_free_method_signature
    -

    - - -

    Retrieving Objects from Tokens

    - - -
    -
    mono_metadata_parse_custom_mod
    - -
    Prototype: mono_metadata_parse_custom_mod
    -

    - -

    -
    -
    mono_metadata_parse_field_type
    - -
    MonoType* -mono_metadata_parse_field_type (MonoImage *m, short field_flags, const char *ptr, const char **rptr) - -
    -

    -Parameters -

    m:
    metadata context to extract information from
    ptr:
    pointer to the field signature
    rptr:
    pointer updated to match the end of the decoded stream
    -Returns -
    The MonoType that was extracted from ptr. -
    -Remarks -

    - Parses the field signature, and returns the type information for it. - - -

    -
    -
    mono_metadata_parse_marshal_spec
    - -
    Prototype: mono_metadata_parse_marshal_spec
    -

    - -

    -
    -
    mono_metadata_parse_method_signature_full
    - -
    Prototype: mono_metadata_parse_method_signature_full
    -

    - -

    -
    -
    mono_metadata_parse_method_signature
    - -
    Prototype: mono_metadata_parse_method_signature
    -

    - -

    -
    -
    mono_metadata_parse_mh_full
    - -
    Prototype: mono_metadata_parse_mh_full
    -

    - -

    -
    -
    mono_metadata_parse_mh
    - -
    Prototype: mono_metadata_parse_mh
    -

    - -

    -
    -
    mono_metadata_parse_param
    - -
    MonoType* -mono_metadata_parse_param (MonoImage *m, const char *ptr, const char **rptr) - -
    -

    -Parameters -

    m:
    metadata context to extract information from
    ptr:
    pointer to the param signature
    rptr:
    pointer updated to match the end of the decoded stream
    -Returns -
    The MonoType that was extracted from ptr. -
    -Remarks -

    - Parses the param signature, and returns the type information for it. - - -

    -
    -
    mono_metadata_parse_signature
    - -
    Prototype: mono_metadata_parse_signature
    -

    - -

    -
    -
    mono_metadata_parse_typedef_or_ref
    - -
    Prototype: mono_metadata_parse_typedef_or_ref
    -

    - -

    -
    -
    mono_metadata_parse_type_full
    - -
    Prototype: mono_metadata_parse_type_full
    -

    - -

    -
    -
    mono_metadata_parse_type
    - -
    static MonoType* -mono_metadata_parse_type_internal (MonoImage *m, MonoGenericContainer *container, MonoParseTypeMode mode, - short opt_attrs, gboolean transient, const char *ptr, const char **rptr) - -
    -

    -Parameters -

    m:
    metadata context
    mode:
    king of type that may be found at ptr
    opt_attrs:
    optional attributes to store in the returned type
    ptr:
    pointer to the type representation
    rptr:
    pointer updated to match the end of the decoded stream
    transient:
    whenever to allocate the result from the heap or from a mempool
    -Returns -
    a MonoType structure representing the decoded type. -
    -Remarks -

    - - Decode a compressed type description found at ptr in m. - mode 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. - - 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. - - LOCKING: Acquires the loader lock. - - - -

    Generics Support

    - - -
    -
    mono_metadata_generic_class_is_valuetype
    - -
    Prototype: mono_metadata_generic_class_is_valuetype
    -

    - -

    -
    -
    mono_metadata_inflate_generic_inst
    - -
    Prototype: mono_metadata_inflate_generic_inst
    -

    - -

    -
    -
    mono_metadata_load_generic_params
    - -
    Prototype: mono_metadata_load_generic_params
    -

    - - -

    Tokens

    - - -
    -
    mono_ldtoken
    - -
    Prototype: mono_ldtoken
    -

    - -

    -
    -
    mono_ldstr
    - -
    MonoString* -mono_ldstr (MonoDomain *domain, MonoImage *image, guint32 idx) - -
    -

    -Parameters -

    domain:
    the domain where the string will be used.
    image:
    a metadata context
    idx:
    index into the user string table.
    -Returns -
    a loaded string from the image/idx combination. -
    -Remarks -

    - - Implementation for the ldstr opcode. - -

    -
    -
    mono_exception_from_token
    - -
    MonoException* -mono_exception_from_token (MonoImage *image, guint32 token) - -
    -

    -Parameters -

    image:
    the Mono image where to look for the class
    token:
    The type token of the class
    -Returns -
    the initialized exception instance. -
    -Remarks -

    - Creates an exception of the type given by token. - - - -

    OpCodes

    - - -
    -
    mono_opcode_name
    - -
    Prototype: mono_opcode_name
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-methods.html b/docs/deploy/mono-api-methods.html deleted file mode 100644 index d8abf6ee8d..0000000000 --- a/docs/deploy/mono-api-methods.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - mono-api-methods.html - - - -

    Methods

    - -

    Invoking Methods

    - - -
    -
    mono_runtime_invoke
    - -
    MonoObject* -mono_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc) - -
    -

    -Parameters -

    method:
    method to invoke
    obJ:
    object instance
    params:
    arguments to the method
    exc:
    exception information.
    -Remarks -

    - Invokes the method represented by method on the object obj. - - obj is the 'this' pointer, it should be NULL for static - methods, a MonoObject* for object instances and a pointer to - the value type for value types. - - The params array contains the arguments to the method with the - same convention: MonoObject* pointers for object instances and - pointers to the value type otherwise. - -

    - From unmanaged code you'll usually use the - mono_runtime_invoke() variant. - - Note that this function doesn't handle virtual methods for - you, it will exec the exact method you pass: we still need to - expose a function to lookup the derived class implementation - of a virtual method (there are examples of this in the code, - though). - -

    - You can pass NULL as the exc argument if you don't want to - catch exceptions, otherwise, *exc will be set to the exception - thrown, if any. if an exception is thrown, you can't use the - MonoObject* result from the function. - -

    - If the method returns a value type, it is boxed in an object - reference. - - -If you want to invoke generic methods, you must call the method on the -"inflated" class, which you can obtain from the -mono_object_get_class() - -

    -MonoClass *clazz; -MonoMethod *method; - -clazz = mono_object_get_class (obj); - -/* - * If there are more Add methods declared, you - * may use mono_method_desc_search_in_class (clazz, ":Add(T)"), - * you must substitute ":Add(T)" with the correct type, for example - * for List<int>, you would use ":Add(int)". - */ -method = mono_class_get_method_from_name (clazz, "Add", 1); -mono_runtime_invoke (method, obj, args, &exception); -
    - - -
    -
    -
    mono_runtime_invoke_array
    - -
    MonoObject* -mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params, - MonoObject **exc) - -
    -

    -Parameters -

    method:
    method to invoke
    obJ:
    object instance
    params:
    arguments to the method
    exc:
    exception information.
    -Remarks -

    - Invokes the method represented by method on the object obj. - - obj is the 'this' pointer, it should be NULL for static - methods, a MonoObject* for object instances and a pointer to - the value type for value types. - - The params array contains the arguments to the method with the - same convention: MonoObject* pointers for object instances and - pointers to the value type otherwise. The _invoke_array - variant takes a C# object[] as the params argument (MonoArray - *params): in this case the value types are boxed inside the - respective reference representation. - -

    - From unmanaged code you'll usually use the - mono_runtime_invoke() variant. - - Note that this function doesn't handle virtual methods for - you, it will exec the exact method you pass: we still need to - expose a function to lookup the derived class implementation - of a virtual method (there are examples of this in the code, - though). - -

    - You can pass NULL as the exc argument if you don't want to - catch exceptions, otherwise, *exc will be set to the exception - thrown, if any. if an exception is thrown, you can't use the - MonoObject* result from the function. - -

    - If the method returns a value type, it is boxed in an object - reference. - -

    -
    -
    mono_runtime_delegate_invoke
    - -
    MonoObject* -mono_runtime_delegate_invoke (MonoObject *delegate, void **params, MonoObject **exc) - -
    -

    -Parameters -

    delegate:
    pointer to a delegate object.
    params:
    parameters for the delegate.
    exc:
    Pointer to the exception result.
    -Remarks -

    - Invokes the delegate method delegate with the parameters provided. - - You can pass NULL as the exc argument if you don't want to - catch exceptions, otherwise, *exc will be set to the exception - thrown, if any. if an exception is thrown, you can't use the - MonoObject* result from the function. - - -

    -
    -
    mono_method_body_get_object
    - -
    Prototype: mono_method_body_get_object
    -

    - -

    -
    -
    mono_method_desc_free
    - -
    void -mono_method_desc_free (MonoMethodDesc *desc) - -
    -

    -Parameters -

    desc:
    method description to be released
    -Remarks -

    - Releases the MonoMethodDesc object desc. - -

    -
    -
    mono_method_desc_from_method
    - -
    Prototype: mono_method_desc_from_method
    -

    - -

    -
    -
    mono_method_desc_full_match
    - -
    Prototype: mono_method_desc_full_match
    -

    - -

    -
    -
    mono_method_desc_match
    - -
    Prototype: mono_method_desc_match
    -

    - -

    -
    -
    mono_method_desc_new
    - -
    MonoMethodDesc* -mono_method_desc_new (const char *name, gboolean include_namespace) - -
    -

    -Parameters -

    name:
    the method name.
    include_namespace:
    whether the name includes a namespace or not.
    -Returns -
    a parsed representation of the method description. -
    -Remarks -

    - Creates a method description for name, which conforms to the following - specification: - - [namespace.]classname:methodname[(args...)] - - in all the loaded assemblies. - - Both classname and methodname can contain '*' which matches anything. - - -

    -
    -
    mono_method_desc_search_in_class
    - -
    Prototype: mono_method_desc_search_in_class
    -

    - -

    -
    -
    mono_method_desc_search_in_image
    - -
    Prototype: mono_method_desc_search_in_image
    -

    - -

    -
    -
    mono_method_full_name
    - -
    Prototype: mono_method_full_name
    -

    - -

    -
    -
    mono_method_get_class
    - -
    Prototype: mono_method_get_class
    -

    - -

    -
    -
    mono_method_get_flags
    - -
    Prototype: mono_method_get_flags
    -

    - -

    -
    -
    mono_method_get_last_managed
    - -
    Prototype: mono_method_get_last_managed
    -

    - -

    -
    -
    mono_method_get_marshal_info
    - -
    Prototype: mono_method_get_marshal_info
    -

    - -

    -
    -
    mono_method_get_name
    - -
    Prototype: mono_method_get_name
    -

    - -

    -
    -
    mono_method_get_object
    - -
    Prototype: mono_method_get_object
    -

    - -

    -
    -
    mono_method_get_param_names
    - -
    Prototype: mono_method_get_param_names
    -

    - -

    -
    -
    mono_method_get_param_token
    - -
    Prototype: mono_method_get_param_token
    -

    - -

    -
    -
    mono_method_get_signature
    - -
    Prototype: mono_method_get_signature
    -

    - -

    -
    -
    mono_method_get_index
    - -
    Prototype: mono_method_get_index
    -

    - -

    -
    -
    mono_method_get_signature_full
    - -
    Prototype: mono_method_get_signature_full
    -

    - -

    -
    -
    mono_method_get_token
    - -
    Prototype: mono_method_get_token
    -

    - -

    -
    -
    mono_method_has_marshal_info
    - -
    Prototype: mono_method_has_marshal_info
    -

    - -

    -
    -
    mono_method_verify
    - -
    Prototype: mono_method_verify
    -

    - - -

    Method Signatures

    - - -
    -
    mono_method_signature
    - -
    MonoMethodSignature* -mono_method_signature (MonoMethod *m) - -
    -

    -Remarks -

    - Return the signature of the method M. On failure, returns NULL. - -

    -
    -
    mono_signature_explicit_this
    - -
    gboolean -mono_signature_explicit_this (MonoMethodSignature *sig) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    -Returns -
    TRUE if this the method signature sig has an explicit - - instance argument. FALSE otherwise.
    - -
    -
    -
    mono_signature_get_call_conv
    - -
    guint32 -mono_signature_get_call_conv (MonoMethodSignature *sig) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    -Returns -
    the call convention of the method signature sig. -
    - -
    -
    -
    mono_signature_get_desc
    - -
    Prototype: mono_signature_get_desc
    -

    - -

    -
    -
    mono_signature_get_param_count
    - -
    guint32 -mono_signature_get_param_count (MonoMethodSignature *sig) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    -Returns -
    the number of parameters in the method signature sig. -
    - -
    -
    -
    mono_signature_get_params
    - -
    MonoType* -mono_signature_get_params (MonoMethodSignature *sig, gpointer *iter) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    iter:
    pointer to an iterator
    -Returns -
    the next parameter type of the method signature sig, - - NULL when finished.
    -Remarks -

    - Iterates over the parameters for the method signature sig. - A void* pointer must be initualized to NULL to start the iteration - and it's address is passed to this function repeteadly until it returns - NULL. - - -

    -
    -
    mono_signature_get_return_type
    - -
    MonoType* -mono_signature_get_return_type (MonoMethodSignature *sig) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    -Returns -
    the return type of the method signature sig -
    - -
    -
    -
    mono_signature_hash
    - -
    Prototype: mono_signature_hash
    -

    - -

    -
    -
    mono_signature_is_instance
    - -
    gboolean -mono_signature_is_instance (MonoMethodSignature *sig) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    -Returns -
    TRUE if this the method signature sig has an implicit - - first instance argument. FALSE otherwise.
    - -
    -
    -
    mono_signature_vararg_start
    - -
    int -mono_signature_vararg_start (MonoMethodSignature *sig) - -
    -

    -Parameters -

    sig:
    the method signature inspected
    -Returns -
    the number of the first vararg parameter in the - - method signature sig. -1 if this is not a vararg signature.
    - -
    -
    -
    mono_param_get_objects
    - -
    Prototype: mono_param_get_objects
    -

    - -

    -
    -
    mono_get_method_full
    - -
    Prototype: mono_get_method_full
    -

    - -

    -
    -
    mono_get_method
    - -
    Prototype: mono_get_method
    -

    - - -

    Methods Header Operations

    - - -
    -
    mono_method_get_header
    - -
    Prototype: mono_method_get_header
    -

    - -

    -
    -
    mono_method_header_get_clauses
    - -
    Prototype: mono_method_header_get_clauses
    -

    - -

    -
    -
    mono_method_header_get_code
    - -
    Prototype: mono_method_header_get_code
    -

    - -

    -
    -
    mono_method_header_get_locals
    - -
    Prototype: mono_method_header_get_locals
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-object.html b/docs/deploy/mono-api-object.html deleted file mode 100644 index 51cdd0dcbe..0000000000 --- a/docs/deploy/mono-api-object.html +++ /dev/null @@ -1,1134 +0,0 @@ - - - - mono-api-object.html - - - -

    Object API

    - -

    The object API deals with all the operations shared by - objects, value - types, arrays. - -

    The object API has methods for accessing fields, properties, events, delegates. - -

    There are some advanced uses that are useful to document - here dealing with remote fields. - -

    Synopsis

    - -
    -#include <metadata/object.h> - -typedef struct MonoVTable MonoVTable; -typedef struct _MonoThreadsSync MonoThreadsSync; - -typedef struct { - MonoVTable *vtable; - MonoThreadsSync *synchronisation; -} MonoObject; - -typedef struct { - guint32 length; - guint32 lower_bound; -} MonoArrayBounds; - -typedef struct { - MonoObject obj; - /* bounds is NULL for szarrays */ - MonoArrayBounds *bounds; - /* total number of elements of the array */ - guint32 max_length; - /* we use double to ensure proper alignment on platforms that need it */ - double vector [MONO_ZERO_LEN_ARRAY]; -} MonoArray; - -MonoObject* mono_object_new (MonoDomain *domain, - MonoClass *klass); - - -MonoObject* mono_object_new_from_token (MonoDomain *domain, - MonoImage *image, - guint32 token); -MonoObject* mono_object_new_specific (MonoVTable *vtable); -MonoObject* mono_object_clone (MonoObject *obj); -MonoClass* mono_object_get_class (MonoObject *obj); -MonoDomain* mono_object_get_domain (MonoObject *obj); -MonoMethod* mono_object_get_virtual_method (MonoObject *obj, - MonoMethod *method); - -MonoObject* mono_object_isinst (MonoObject *obj, - MonoClass *klass); -gpointer mono_object_unbox (MonoObject *obj); -MonoObject* mono_object_castclass_mbyref (MonoObject *obj, - MonoClass *klass); - -guint mono_object_get_size (MonoObject* o); -MonoObject* mono_value_box (MonoDomain *domain, - MonoClass *class, - gpointer value); - - -MonoArray* mono_array_new (MonoDomain *domain, - MonoClass *eclass, - uintptr_t n); -MonoArray* mono_array_new_full (MonoDomain *domain, - MonoClass *array_class, - uintptr_t *lengths, - intptr_t *lower_bounds); -MonoArray* mono_array_new_specific (MonoVTable *vtable, - uintptr_t n); -MonoClass* mono_array_class_get (MonoClass *eclass, - guint32 rank); -MonoArray* mono_array_clone (MonoArray *array); - - -uintptr_t mono_array_length (MonoArray *array); - -char* mono_array_addr_with_size (MonoArray *array, - int size, - uintptr_t idx); - -gint32 mono_array_element_size (MonoClass *ac); - - -const char* mono_field_get_name (MonoClassField *field); -MonoClass* mono_field_get_parent (MonoClassField *field); -MonoType* mono_field_get_type (MonoClassField *field); -void mono_field_get_value (MonoObject *obj, - MonoClassField *field, - void *value); -MonoObject* mono_field_get_value_object (MonoDomain *domain, - MonoClassField *field, - MonoObject *obj); -void mono_field_set_value (MonoObject *obj, - MonoClassField *field, - void *value); -void mono_field_static_get_value (MonoVTable *vt, - MonoClassField *field, - void *value); -void mono_field_static_set_value (MonoVTable *vt, - MonoClassField *field, - void *value); - - -guint32 mono_property_get_flags (MonoProperty *prop); -MonoMethod* mono_property_get_get_method (MonoProperty *prop); - -MonoClass* mono_property_get_parent (MonoProperty *prop); -MonoMethod* mono_property_get_set_method (MonoProperty *prop); -MonoObject* mono_property_get_value (MonoProperty *prop, - void *obj, - void **params, - MonoObject **exc); -void mono_property_set_value (MonoProperty *prop, - void *obj, - void **params, - MonoObject **exc); - -MonoMethod* mono_event_get_add_method (MonoEvent *event); -guint32 mono_event_get_flags (MonoEvent *event); -const char* mono_event_get_name (MonoEvent *event); -MonoClass* mono_event_get_parent (MonoEvent *event); -MonoMethod* mono_event_get_raise_method (MonoEvent *event); -MonoMethod* mono_event_get_remove_method (MonoEvent *event); -gpointer mono_load_remote_field (MonoObject *this, - MonoClass *klass, - MonoClassField *field, - gpointer *res); -MonoObject* mono_load_remote_field_new (MonoObject *this, - MonoClass *klass, - MonoClassField *field); -void mono_store_remote_field (MonoObject *this, - MonoClass *klass, - MonoClassField *field, - gpointer val); -void mono_store_remote_field_new (MonoObject *this, - MonoClass *klass, - MonoClassField *field, - MonoObject *arg); - -
    - -

    MonoObject is the base definition for all managed objects - in the Mono runtime, it represents the System.Object - managed type. - -

    All objects that derive from System.Object - do have this base definition. Derived objects are declared - following the pattern where the parent class is the first - field of a structure definition, for example: - -

    - typedef struct { - MonoObject parent; - int my_new_field; - } MyNewObject -
    - - -

    Core Object Methods

    - - -
    -
    mono_object_new
    - -
    MonoObject* -mono_object_new (MonoDomain *domain, MonoClass *klass) - -
    -

    -Parameters -

    klass:
    the class of the object that we want to create
    -Returns -
    a newly created object whose definition is - - looked up using klass. This will not invoke any constructors, - so the consumer of this routine has to invoke any constructors on - its own to initialize the object. - -

    - It returns NULL on failure.

    - - -

    For example, if you wanted to create an object of type - System.Version, you would use a piece of code like this: - -

    -MonoClass *version_class; -MonoObject *result; - -/* Get the class from mscorlib */ -version_class = mono_class_from_name (mono_get_corlib (), - "System", "Version"); - -/* Create an object of that class */ -result = mono_object_new (mono_domain_get (), version_class); -
    - -
    -
    -
    mono_object_new_alloc_specific
    - -
    Prototype: mono_object_new_alloc_specific
    -

    - -

    -
    -
    mono_object_new_fast
    - -
    Prototype: mono_object_new_fast
    -

    - -

    -
    -
    mono_object_new_from_token
    - -
    MonoObject* -mono_object_new_from_token (MonoDomain *domain, MonoImage *image, guint32 token) - -
    -

    -Parameters -

    image:
    Context where the type_token is hosted
    token:
    a token of the type that we want to create
    -Returns -
    A newly created object whose definition is - - looked up using token in the image image
    - -
    -
    -
    mono_object_new_specific
    - -
    MonoObject* -mono_object_new_specific (MonoVTable *vtable) - -
    -

    -Parameters -

    vtable:
    the vtable of the object that we want to create
    -Returns -
    A newly created object with class and domain specified - - by vtable
    - -
    -
    -
    mono_object_clone
    - -
    MonoObject* -mono_object_clone (MonoObject *obj) - -
    -

    -Parameters -

    obj:
    the object to clone
    -Returns -
    A newly created object who is a shallow copy of obj -
    - -
    -
    -
    mono_object_get_class
    - -
    MonoClass* -mono_object_get_class (MonoObject *obj) - -
    -

    -Parameters -

    obj:
    object to query
    -Returns -
    the MonOClass of the object. -
    -Remarks -

    - - -

    -
    -
    mono_object_get_domain
    - -
    MonoDomain* -mono_object_get_domain (MonoObject *obj) - -
    -

    -Parameters -

    obj:
    object to query
    -Returns -
    the MonoDomain where the object is hosted -
    -Remarks -

    - - -

    -
    -
    mono_object_get_virtual_method
    - -
    MonoMethod* -mono_object_get_virtual_method (MonoObject *obj, MonoMethod *method) - -
    -

    -Parameters -

    obj:
    object to operate on.
    method:
    method
    -Remarks -

    - Retrieves the MonoMethod that would be called on obj if obj is passed as - the instance of a callvirt of method. - -

    -
    -
    mono_object_isinst_mbyref
    - -
    Prototype: mono_object_isinst_mbyref
    -

    - -

    -
    -
    mono_object_isinst
    - -
    MonoObject* -mono_object_isinst (MonoObject *obj, MonoClass *klass) - -
    -

    -Parameters -

    obj:
    an object
    klass:
    a pointer to a class
    -Returns -
    obj if obj is derived from klass -
    - -
    -
    -
    mono_object_unbox
    - -
    gpointer -mono_object_unbox (MonoObject *obj) - -
    -

    -Parameters -

    obj:
    object to unbox
    -Returns -
    a pointer to the start of the valuetype boxed in this - - object. - - This method will assert if the object passed is not a valuetype.
    -Remarks -

    - - -

    -
    -
    mono_object_castclass_mbyref
    - -
    MonoObject* -mono_object_castclass_mbyref (MonoObject *obj, MonoClass *klass) - -
    -

    -Parameters -

    obj:
    an object
    klass:
    a pointer to a class
    -Returns -
    obj if obj is derived from klass, throws an exception otherwise -
    - -
    -
    -
    mono_object_is_alive
    - -
    Prototype: mono_object_is_alive
    -

    - -

    -
    -
    mono_object_get_size
    - -
    guint -mono_object_get_size (MonoObject* o) - -
    -

    -Parameters -

    o:
    object to query
    -Returns -
    the size, in bytes, of o -
    -Remarks -

    - - - - -

    Value Types

    - - -
    -
    mono_value_box
    - -
    MonoObject* -mono_value_box (MonoDomain *domain, MonoClass *class, gpointer value) - -
    -

    -Parameters -

    class:
    the class of the value
    value:
    a pointer to the unboxed data
    -Returns -
    A newly created object which contains value. -
    - -
    -
    -
    mono_value_copy
    - -
    Prototype: mono_value_copy
    -

    - -

    -
    -
    mono_value_copy_array
    - -
    Prototype: mono_value_copy_array
    -

    - - - -

    Array Methods

    - -

    Use the mono_array_new_* methods to create arrays - of a given type. - -

    For example, the following code creates an array with two - elements of type System.Byte, and sets the values - 0xca and 0xfe on it: - -

    -
    -	MonoArray *CreateByteArray (MonoDomain *domain)
    -	{
    -	    MonoArray *data;
    -
    -	    data = mono_array_new (domain, mono_get_byte_class (), 2);
    -	    mono_array_set (data, guint8, 0, 0xca);
    -	    mono_array_set (data, guint8, 0, 0xfe);
    -
    -	    return data;
    -	}
    -
    -	
    - -

    Creating Arrays

    - - -
    -
    mono_array_new
    - -
    MonoArray* -mono_array_new (MonoDomain *domain, MonoClass *eclass, uintptr_t n) - -
    -

    -Parameters -

    domain:
    domain where the object is created
    eclass:
    element class
    n:
    number of array elements
    -Remarks -

    - This routine creates a new szarray with n elements of type eclass. - -

    -
    -
    mono_array_new_full
    - -
    MonoArray* -mono_array_new_full (MonoDomain *domain, MonoClass *array_class, uintptr_t *lengths, intptr_t *lower_bounds) - -
    -

    -Parameters -

    domain:
    domain where the object is created
    array_class:
    array class
    lengths:
    lengths for each dimension in the array
    lower_bounds:
    lower bounds for each dimension in the array (may be NULL)
    -Remarks -

    - This routine creates a new array objects with the given dimensions, - lower bounds and type. - -

    -
    -
    mono_array_new_specific
    - -
    MonoArray* -mono_array_new_specific (MonoVTable *vtable, uintptr_t n) - -
    -

    -Parameters -

    vtable:
    a vtable in the appropriate domain for an initialized class
    n:
    number of array elements
    -Remarks -

    - This routine is a fast alternative to mono_array_new() for code which - can be sure about the domain it operates in. - -

    -
    -
    mono_array_class_get
    - -
    MonoClass* -mono_array_class_get (MonoClass *eclass, guint32 rank) - -
    -

    -Parameters -

    element_class:
    element class
    rank:
    the dimension of the array class
    -Returns -
    a class object describing the array with element type element_type and - - dimension rank.
    - -
    -
    -
    mono_array_clone
    - -
    MonoArray* -mono_array_clone (MonoArray *array) - -
    -

    -Parameters -

    array:
    the array to clone
    -Returns -
    A newly created array who is a shallow copy of array -
    - - -

    Using Arrays

    - - -
    -
    mono_array_set
    - -
    Prototype: mono_array_set
    -

    - -

    -
    -
    mono_array_setref
    - -
    Prototype: mono_array_setref
    -

    - -

    -
    -
    mono_array_length
    - -
    uintptr_t -mono_array_length (MonoArray *array) - -
    -

    -Parameters -

    array:
    a MonoArray*
    -Remarks -

    - Returns the total number of elements in the array. This works for - both vectors and multidimensional arrays. - -

    -
    -
    mono_array_addr
    - -
    Prototype: mono_array_addr
    -

    - -

    -
    -
    mono_array_addr_with_size
    - -
    char* -mono_array_addr_with_size (MonoArray *array, int size, uintptr_t idx) - -
    -

    -Parameters -

    array:
    a MonoArray*
    size:
    size of the array elements
    idx:
    index into the array
    -Remarks -

    - Returns the address of the idx element in the array. - -

    -
    -
    mono_array_get
    - -
    Prototype: mono_array_get
    -

    - -

    -
    -
    mono_array_element_size
    - -
    gint32 -mono_array_element_size (MonoClass *ac) - -
    -

    -Parameters -

    ac:
    pointer to a #MonoArrayClass
    -Returns -
    the size of single array element. -
    - - - -

    Fields

    - - -
    -
    mono_field_from_token
    - -
    Prototype: mono_field_from_token
    -

    - -

    -
    -
    mono_field_get_flags
    - -
    Prototype: mono_field_get_flags
    -

    - -

    -
    -
    mono_field_get_name
    - -
    const char* -mono_field_get_name (MonoClassField *field) - -
    -

    -Parameters -

    field:
    the MonoClassField to act on
    -Returns -
    the name of the field. -
    - -
    -
    -
    mono_field_get_parent
    - -
    MonoClass* -mono_field_get_parent (MonoClassField *field) - -
    -

    -Parameters -

    field:
    the MonoClassField to act on
    -Returns -
    MonoClass where the field was defined. -
    - -
    -
    -
    mono_field_get_type
    - -
    MonoType* -mono_field_get_type (MonoClassField *field) - -
    -

    -Parameters -

    field:
    the MonoClassField to act on
    -Returns -
    MonoType of the field. -
    - -
    -
    -
    mono_field_get_value
    - -
    void -mono_field_get_value (MonoObject *obj, MonoClassField *field, void *value) - -
    -

    -Parameters -

    obj:
    Object instance
    field:
    MonoClassField describing the field to fetch information from
    value:
    pointer to the location where the value will be stored
    -Remarks -

    - Use this routine to get the value of the field field in the object - passed. - - The pointer provided by value must be of the field type, for reference - types this is a MonoObject*, for value types its the actual pointer to - the value type. - - For example: - int i; - mono_field_get_value (obj, int_field, &i); - -

    -
    -
    mono_field_get_value_object
    - -
    MonoObject* -mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObject *obj) - -
    -

    -Parameters -

    domain:
    domain where the object will be created (if boxing)
    field:
    MonoClassField describing the field to fetch information from
    obj:
    The object instance for the field.
    -Returns -
    a new MonoObject with the value from the given field. If the - - field represents a value type, the value is boxed. -
    - -
    -
    -
    mono_field_set_value
    - -
    void -mono_field_set_value (MonoObject *obj, MonoClassField *field, void *value) - -
    -

    -Parameters -

    obj:
    Instance object
    field:
    MonoClassField describing the field to set
    value:
    The value to be set
    -Remarks -

    - Sets the value of the field described by field in the object instance obj - to the value passed in value. This method should only be used for instance - fields. For static fields, use mono_field_static_set_value. - - The value must be on the native format of the field type. - -

    -
    -
    mono_field_static_get_value
    - -
    void -mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value) - -
    -

    -Parameters -

    vt:
    vtable to the object
    field:
    MonoClassField describing the field to fetch information from
    value:
    where the value is returned
    -Remarks -

    - Use this routine to get the value of the static field field value. - - The pointer provided by value must be of the field type, for reference - types this is a MonoObject*, for value types its the actual pointer to - the value type. - - For example: - int i; - mono_field_static_get_value (vt, int_field, &i); - -

    -
    -
    mono_field_static_set_value
    - -
    void -mono_field_static_set_value (MonoVTable *vt, MonoClassField *field, void *value) - -
    -

    -Parameters -

    field:
    MonoClassField describing the field to set
    value:
    The value to be set
    -Remarks -

    - Sets the value of the static field described by field - to the value passed in value. - - The value must be on the native format of the field type. - -

    -
    -
    mono_field_get_object
    - -
    Prototype: mono_field_get_object
    -

    - - - -

    Properties

    - - -
    -
    mono_property_get_object
    - -
    Prototype: mono_property_get_object
    -

    - -

    -
    -
    mono_property_get_flags
    - -
    guint32 -mono_property_get_flags (MonoProperty *prop) - -
    -

    -Parameters -

    prop:
    the MonoProperty to act on.
    -Returns -
    the flags for the property. -
    -Remarks -

    - The metadata flags for a property are encoded using the - PROPERTY_ATTRIBUTE_* constants. See the tabledefs.h file for details. - - -

    -
    -
    mono_property_get_get_method
    - -
    MonoMethod* -mono_property_get_get_method (MonoProperty *prop) - -
    -

    -Parameters -

    prop:
    the MonoProperty to act on.
    -Returns -
    the setter method of the property (A MonoMethod) -
    - -
    -
    -
    mono_property_get_name
    - -
    Prototype: mono_property_get_name
    -

    - -

    -
    -
    mono_property_get_parent
    - -
    MonoClass* -mono_property_get_parent (MonoProperty *prop) - -
    -

    -Parameters -

    prop:
    the MonoProperty to act on.
    -Returns -
    the MonoClass where the property was defined. -
    - -
    -
    -
    mono_property_get_set_method
    - -
    MonoMethod* -mono_property_get_set_method (MonoProperty *prop) - -
    -

    -Parameters -

    prop:
    the MonoProperty to act on.
    -Returns -
    the setter method of the property (A MonoMethod) -
    - -
    -
    -
    mono_property_get_value
    - -
    MonoObject* -mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc) - -
    -

    -Parameters -

    prop:
    MonoProperty to fetch
    obj:
    instance object on which to act
    params:
    parameters to pass to the propery
    exc:
    optional exception
    -Returns -
    the value from invoking the get method on the property. -
    -Remarks -

    - Invokes the property's get method with the given arguments on the - object instance obj (or NULL for static properties). - -

    - You can pass NULL as the exc argument if you don't want to - catch exceptions, otherwise, *exc will be set to the exception - thrown, if any. if an exception is thrown, you can't use the - MonoObject* result from the function. - - -

    -
    -
    mono_property_set_value
    - -
    void -mono_property_set_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc) - -
    -

    -Parameters -

    prop:
    MonoProperty to set
    obj:
    instance object on which to act
    params:
    parameters to pass to the propery
    exc:
    optional exception
    -Remarks -

    - Invokes the property's set method with the given arguments on the - object instance obj (or NULL for static properties). - -

    - You can pass NULL as the exc argument if you don't want to - catch exceptions, otherwise, *exc will be set to the exception - thrown, if any. if an exception is thrown, you can't use the - MonoObject* result from the function. - - - -

    Events

    - - -
    -
    mono_event_get_object
    - -
    Prototype: mono_event_get_object
    -

    - -

    -
    -
    mono_event_get_add_method
    - -
    MonoMethod* -mono_event_get_add_method (MonoEvent *event) - -
    -

    -Parameters -

    event:
    The MonoEvent to act on.
    -Returns -
    the add' method for the event (a MonoMethod). -
    - -
    -
    -
    mono_event_get_flags
    - -
    guint32 -mono_event_get_flags (MonoEvent *event) - -
    -

    -Parameters -

    event:
    the MonoEvent to act on.
    -Returns -
    the flags for the event. -
    -Remarks -

    - The metadata flags for an event are encoded using the - EVENT_* constants. See the tabledefs.h file for details. - - -

    -
    -
    mono_event_get_name
    - -
    const char* -mono_event_get_name (MonoEvent *event) - -
    -

    -Parameters -

    event:
    the MonoEvent to act on
    -Returns -
    the name of the event. -
    - -
    -
    -
    mono_event_get_parent
    - -
    MonoClass* -mono_event_get_parent (MonoEvent *event) - -
    -

    -Parameters -

    event:
    the MonoEvent to act on.
    -Returns -
    the MonoClass where the event is defined. -
    - -
    -
    -
    mono_event_get_raise_method
    - -
    MonoMethod* -mono_event_get_raise_method (MonoEvent *event) - -
    -

    -Parameters -

    event:
    The MonoEvent to act on.
    -Returns -
    the raise method for the event (a MonoMethod). -
    - -
    -
    -
    mono_event_get_remove_method
    - -
    MonoMethod* -mono_event_get_remove_method (MonoEvent *event) - -
    -

    -Parameters -

    event:
    The MonoEvent to act on.
    -Returns -
    the remove method for the event (a MonoMethod). -
    - - - -

    Remote Fields

    - -
    -
    mono_load_remote_field
    - -
    gpointer -mono_load_remote_field (MonoObject *this, MonoClass *klass, MonoClassField *field, gpointer *res) - -
    -

    -Parameters -

    this:
    pointer to an object
    klass:
    klass of the object containing field
    field:
    the field to load
    res:
    a storage to store the result
    -Returns -
    an address pointing to the value of field. -
    -Remarks -

    - This method is called by the runtime on attempts to load fields of - transparent proxy objects. this points to such TP, klass is the class of - the object containing field. res is a storage location which can be - used to store the result. - - -

    -
    -
    mono_load_remote_field_new
    - -
    MonoObject* -mono_load_remote_field_new (MonoObject *this, MonoClass *klass, MonoClassField *field) - -
    -

    -Parameters -

    this:
    klass:
    field:
    -Remarks -

    - Missing documentation. - -

    -
    -
    mono_store_remote_field
    - -
    void -mono_store_remote_field (MonoObject *this, MonoClass *klass, MonoClassField *field, gpointer val) - -
    -

    -Parameters -

    this:
    pointer to an object
    klass:
    klass of the object containing field
    field:
    the field to load
    val:
    the value/object to store
    -Remarks -

    - This method is called by the runtime on attempts to store fields of - transparent proxy objects. this points to such TP, klass is the class of - the object containing field. val is the new value to store in field. - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-profiler.html b/docs/deploy/mono-api-profiler.html deleted file mode 100644 index c0b89c9601..0000000000 --- a/docs/deploy/mono-api-profiler.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - mono-api-profiler.html - - - -

    Profiling Interface

    - -

    Profiler Operation

    - -

    The following methods can be used by dynamic profiler - methods to monitor different aspects of the program. - -

    A custom profiler will have one public method defined in - the shared library which is the entry point that Mono calls at - startup, it has the following signature: - -

    -	void mono_profiler_startup (const char *desc)
    -	
    - -

    Where "desc" is the set of arguments that were passed from - the command line. This routine will call - mono_profiler_install to activate the profiler and - will install one or more filters (one of the various - mono_profiler_install_ functions). - -

    In addition, a profiler developer will typically call - mono_profiler_set_events to register which kinds of - traces should be enabled, these can be an OR-ed combination of - the following: - -

    -	MONO_PROFILE_NONE
    -        MONO_PROFILE_APPDOMAIN_EVENTS
    -        MONO_PROFILE_ASSEMBLY_EVENTS
    -        MONO_PROFILE_MODULE_EVENTS    
    -        MONO_PROFILE_CLASS_EVENTS     
    -        MONO_PROFILE_JIT_COMPILATION  
    -        MONO_PROFILE_INLINING         
    -        MONO_PROFILE_EXCEPTIONS       
    -        MONO_PROFILE_ALLOCATIONS      
    -        MONO_PROFILE_GC               
    -        MONO_PROFILE_THREADS          
    -        MONO_PROFILE_REMOTING         
    -        MONO_PROFILE_TRANSITIONS      
    -        MONO_PROFILE_ENTER_LEAVE      
    -        MONO_PROFILE_COVERAGE         
    -        MONO_PROFILE_INS_COVERAGE     
    -        MONO_PROFILE_STATISTICAL      
    -	
    - -

    Developers can change the set of monitored events at - runtime by calling mono_profiler_set_events. - - -

    -
    mono_profiler_install
    - -
    void -mono_profiler_install (MonoProfiler *prof, MonoProfileFunc callback) - -
    -

    -Parameters -

    prof:
    a MonoProfiler structure pointer, or a pointer to a derived structure.
    callback:
    the function to invoke at shutdown
    -Remarks -

    - Use mono_profiler_install to activate profiling in the Mono runtime. - Typically developers of new profilers will create a new structure whose - first field is a MonoProfiler and put any extra information that they need - to access from the various profiling callbacks there. - - -

    -
    -
    mono_profiler_install_allocation
    - -
    Prototype: mono_profiler_install_allocation
    -

    - -

    -
    -
    mono_profiler_install_appdomain
    - -
    Prototype: mono_profiler_install_appdomain
    -

    - -

    -
    -
    mono_profiler_install_assembly
    - -
    Prototype: mono_profiler_install_assembly
    -

    - -

    -
    -
    mono_profiler_install_class
    - -
    Prototype: mono_profiler_install_class
    -

    - -

    -
    -
    mono_profiler_install_coverage_filter
    - -
    Prototype: mono_profiler_install_coverage_filter
    -

    - -

    -
    -
    mono_profiler_install_enter_leave
    - -
    void -mono_profiler_install_enter_leave (MonoProfileMethodFunc enter, MonoProfileMethodFunc fleave) - -
    -

    -Parameters -

    enter:
    the routine to be called on each method entry
    fleave:
    the routine to be called each time a method returns
    -Remarks -

    - Use this routine to install routines that will be called everytime - a method enters and leaves. The routines will receive as an argument - the MonoMethod representing the method that is entering or leaving. - -

    -
    -
    mono_profiler_install_jit_compile
    - -
    void -mono_profiler_install_jit_compile (MonoProfileMethodFunc start, MonoProfileMethodResult end) - -
    -

    -Parameters -

    start:
    the routine to be called when the JIT process starts.
    end:
    the routine to be called when the JIT process ends.
    -Remarks -

    - Use this routine to install routines that will be called when JIT - compilation of a method starts and completes. - -

    -
    -
    mono_profiler_install_module
    - -
    Prototype: mono_profiler_install_module
    -

    - -

    -
    -
    mono_profiler_install_thread
    - -
    Prototype: mono_profiler_install_thread
    -

    - -

    -
    -
    mono_profiler_install_transition
    - -
    Prototype: mono_profiler_install_transition
    -

    - -

    -
    -
    mono_profiler_install_gc
    - -
    Prototype: mono_profiler_install_gc
    -

    - -

    -
    -
    mono_profiler_install_statistical
    - -
    Prototype: mono_profiler_install_statistical
    -

    - -

    -
    -
    mono_profiler_set_events
    - -
    void -mono_profiler_set_events (MonoProfileFlags events) - -
    -

    -Parameters -

    events:
    an ORed set of values made up of MONO_PROFILER_ flags
    -Remarks -

    - The events descriped in the events argument is a set of flags - that represent which profiling events must be triggered. For - example if you have registered a set of methods for tracking - JIT compilation start and end with mono_profiler_install_jit_compile, - you will want to pass the MONO_PROFILE_JIT_COMPILATION flag to - this routine. - - You can call mono_profile_set_events more than once and you can - do this at runtime to modify which methods are invoked. - -

    -
    -
    mono_profiler_get_events
    - -
    MonoProfileFlags -mono_profiler_get_events (void) - -
    -

    -Remarks -

    - Returns a list of active events that will be intercepted. - - -

    Coverage

    - -

    To support profiling modules that need to do code coverage - analysis, the following routines is provided: - - - - \ No newline at end of file diff --git a/docs/deploy/mono-api-reflection.html b/docs/deploy/mono-api-reflection.html deleted file mode 100644 index 775871a1bb..0000000000 --- a/docs/deploy/mono-api-reflection.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - mono-api-reflection.html - - - -

    Fetching Types, and Basic Reflection

    - - -
    -
    mono_reflection_get_custom_attrs_blob
    - -
    Prototype: mono_reflection_get_custom_attrs_blob
    -

    - -

    -
    -
    mono_reflection_get_custom_attrs
    - -
    Prototype: mono_reflection_get_custom_attrs
    -

    - -

    -
    -
    mono_custom_attrs_get_attr
    - -
    Prototype: mono_custom_attrs_get_attr
    -

    - -

    -
    -
    mono_reflection_get_token
    - -
    Prototype: mono_reflection_get_token
    -

    - -

    -
    -
    mono_reflection_get_type
    - -
    Prototype: mono_reflection_get_type
    -

    - -

    -
    -
    mono_reflection_parse_type
    - -
    Prototype: mono_reflection_parse_type
    -

    - -

    -
    -
    mono_reflection_type_from_name
    - -
    Prototype: mono_reflection_type_from_name
    -

    - -

    -
    -
    mono_reflection_get_custom_attrs_info
    - -
    Prototype: mono_reflection_get_custom_attrs_info
    -

    - - -

    Custom Attributes

    - - -
    -
    mono_custom_attrs_construct
    - -
    Prototype: mono_custom_attrs_construct
    -

    - -

    -
    -
    mono_custom_attrs_free
    - -
    Prototype: mono_custom_attrs_free
    -

    - -

    -
    -
    mono_custom_attrs_from_assembly
    - -
    Prototype: mono_custom_attrs_from_assembly
    -

    - -

    -
    -
    mono_custom_attrs_from_class
    - -
    Prototype: mono_custom_attrs_from_class
    -

    - -

    -
    -
    mono_custom_attrs_from_event
    - -
    Prototype: mono_custom_attrs_from_event
    -

    - -

    -
    -
    mono_custom_attrs_from_field
    - -
    Prototype: mono_custom_attrs_from_field
    -

    - -

    -
    -
    mono_custom_attrs_from_index
    - -
    MonoCustomAttrInfo* -mono_custom_attrs_from_index (MonoImage *image, guint32 idx) - -
    -

    -Returns -

    NULL if no attributes are found or if a loading error occurs. -
    - -
    -
    -
    mono_custom_attrs_from_method
    - -
    Prototype: mono_custom_attrs_from_method
    -

    - -

    -
    -
    mono_custom_attrs_from_param
    - -
    MonoCustomAttrInfo* -mono_custom_attrs_from_param (MonoMethod *method, guint32 param) - -
    -

    -Parameters -

    method:
    handle to the method that we want to retrieve custom parameter information from
    param:
    parameter number, where zero represent the return value, and one is the first parameter in the method
    -Returns -
    the custom attribute object for the specified parameter, or NULL if there are none. -
    -Remarks -

    - The result must be released with mono_custom_attrs_free(). - - -

    -
    -
    mono_custom_attrs_from_property
    - -
    Prototype: mono_custom_attrs_from_property
    -

    - -

    -
    -
    mono_custom_attrs_has_attr
    - -
    Prototype: mono_custom_attrs_has_attr
    -

    - - -

    - -
    -
    mono_module_file_get_object
    - -
    Prototype: mono_module_file_get_object
    -

    - -

    -
    -
    mono_module_get_object
    - -
    Prototype: mono_module_get_object
    -

    - -

    -
    -
    mono_method_body_get_object
    - -
    Prototype: mono_method_body_get_object
    -

    - -

    -
    -
    mono_event_get_object
    - -
    Prototype: mono_event_get_object
    -

    - -

    -
    -
    mono_assembly_get_object
    - -
    Prototype: mono_assembly_get_object
    -

    - -

    -
    -
    mono_param_get_objects
    - -
    Prototype: mono_param_get_objects
    -

    - -

    -
    -
    mono_field_get_object
    - -
    Prototype: mono_field_get_object
    -

    - -

    -
    -
    mono_property_get_object
    - -
    Prototype: mono_property_get_object
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-security.html b/docs/deploy/mono-api-security.html deleted file mode 100644 index 9643964250..0000000000 --- a/docs/deploy/mono-api-security.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - mono-api-security.html - - - -

    Security Manager

    - - -
    -
    mono_get_context_capture_method
    - -
    Prototype: mono_get_context_capture_method
    -

    - - -

    Declarative Security

    - - -
    -
    mono_declsec_flags_from_assembly
    - -
    Prototype: mono_declsec_flags_from_assembly
    -

    - -

    -
    -
    mono_declsec_flags_from_class
    - -
    Prototype: mono_declsec_flags_from_class
    -

    - -

    -
    -
    mono_declsec_flags_from_method
    - -
    Prototype: mono_declsec_flags_from_method
    -

    - -

    -
    -
    mono_declsec_get_assembly_action
    - -
    Prototype: mono_declsec_get_assembly_action
    -

    - -

    -
    -
    mono_declsec_get_class_action
    - -
    Prototype: mono_declsec_get_class_action
    -

    - -

    -
    -
    mono_declsec_get_demands
    - -
    Prototype: mono_declsec_get_demands
    -

    - -

    -
    -
    mono_declsec_get_inheritdemands_class
    - -
    Prototype: mono_declsec_get_inheritdemands_class
    -

    - -

    -
    -
    mono_declsec_get_inheritdemands_method
    - -
    Prototype: mono_declsec_get_inheritdemands_method
    -

    - -

    -
    -
    mono_declsec_get_linkdemands
    - -
    Prototype: mono_declsec_get_linkdemands
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-string.html b/docs/deploy/mono-api-string.html deleted file mode 100644 index 54b012b1df..0000000000 --- a/docs/deploy/mono-api-string.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - mono-api-string.html - - - -

    Strings

    - -

    Strings representation inside the Mono runtime. - -

    Synopsis

    - -
    -#include <metadata/object.h> - -typedef struct { - MonoObject object; - gint32 length; - gunichar2 chars [0]; -} MonoString; - -MonoString* mono_string_new (MonoDomain *domain, - const char *text); -MonoString* mono_string_new_len (MonoDomain *domain, - const char *text, - guint length); -MonoString* mono_string_new_size (MonoDomain *domain, - gint32 len); -MonoString* mono_string_new_utf16 (MonoDomain *domain, - const guint16 *text, - gint32 len); -MonoString* mono_string_from_utf16 (gunichar2 *data); -mono_unichar2* mono_string_to_utf16 (MonoString *s); -char* mono_string_to_utf8 (MonoString *s); -gboolean mono_string_equal (MonoString *s1, - MonoString *s2); -guint mono_string_hash (MonoString *s); -MonoString* mono_string_intern (MonoString *str); -MonoString* mono_string_is_interned (MonoString *o); -MonoString* mono_string_new_wrapper (const char *text); -gunichar2* mono_string_chars (MonoString *s); -int mono_string_length (MonoString *s); -gunichar2* mono_unicode_from_external (const gchar *in, - gsize *bytes); - - - -
    - -

    All of the operations on strings are done on pointers to - MonoString objects, like this: - -

    - MonoString *hello = mono_string_new (mono_domain_get (), "hello, world"); -
    - -

    Strings are bound to a particular application domain, which - is why it is necessary to pass a MonoDomain argument as the - first parameter to all the constructor functions. - -

    Typically, you want to create the strings on the current - application domain, so a call to mono_domain_get() is - sufficient. - -

    Constructors

    - - -
    -
    mono_string_new
    - -
    MonoString* -mono_string_new (MonoDomain *domain, const char *text) - -
    -

    -Parameters -

    text:
    a pointer to an utf8 string
    -Returns -
    A newly created string object which contains text. -
    - -
    -
    -
    mono_string_new_len
    - -
    MonoString* -mono_string_new_len (MonoDomain *domain, const char *text, guint length) - -
    -

    -Parameters -

    text:
    a pointer to an utf8 string
    length:
    number of bytes in text to consider
    -Returns -
    A newly created string object which contains text. -
    - -
    -
    -
    mono_string_new_size
    - -
    MonoString* -mono_string_new_size (MonoDomain *domain, gint32 len) - -
    -

    -Parameters -

    text:
    a pointer to an utf16 string
    len:
    the length of the string
    -Returns -
    A newly created string object of len -
    - -
    -
    -
    mono_string_new_utf16
    - -
    MonoString* -mono_string_new_utf16 (MonoDomain *domain, const guint16 *text, gint32 len) - -
    -

    -Parameters -

    text:
    a pointer to an utf16 string
    len:
    the length of the string
    -Returns -
    A newly created string object which contains text. -
    - -
    -
    -
    mono_string_from_utf16
    - -
    MonoString* -mono_string_from_utf16 (gunichar2 *data) - -
    -

    -Parameters -

    data:
    the UTF16 string (LPWSTR) to convert
    -Returns -
    a MonoString. -
    -Remarks -

    - Converts a NULL terminated UTF16 string (LPWSTR) to a MonoString. - - - -

    Conversions

    - - -
    -
    mono_string_to_utf16
    - -
    mono_unichar2* -mono_string_to_utf16 (MonoString *s) - -
    -

    -Parameters -

    s:
    a MonoString
    -Remarks -

    - Return an null-terminated array of the utf-16 chars - contained in s. The result must be freed with g_free(). - This is a temporary helper until our string implementation - is reworked to always include the null terminating char. - -

    -
    -
    mono_string_to_utf8
    - -
    char* -mono_string_to_utf8 (MonoString *s) - -
    -

    -Parameters -

    s:
    a System.String
    -Remarks -

    - Returns the UTF8 representation for s. - The resulting buffer needs to be freed with mono_free(). - - deprecated Use mono_string_to_utf8_checked to avoid having an exception arbritraly raised. - - -

    Methods

    - - -
    -
    mono_string_equal
    - -
    gboolean -mono_string_equal (MonoString *s1, MonoString *s2) - -
    -

    -Parameters -

    s1:
    First string to compare
    s2:
    Second string to compare
    -Remarks -

    - Returns FALSE if the strings differ. - -

    -
    -
    mono_string_hash
    - -
    guint -mono_string_hash (MonoString *s) - -
    -

    -Parameters -

    s:
    the string to hash
    -Remarks -

    - Returns the hash for the string. - -

    -
    -
    mono_string_intern
    - -
    MonoString* -mono_string_intern (MonoString *str) - -
    -

    -Parameters -

    o:
    String to intern
    -Returns -
    The interned string. -
    -Remarks -

    - Interns the string passed. - -

    -
    -
    mono_string_is_interned
    - -
    MonoString* -mono_string_is_interned (MonoString *o) - -
    -

    -Parameters -

    o:
    String to probe
    -Remarks -

    - Returns whether the string has been interned. - -

    -
    -
    mono_string_new_wrapper
    - -
    MonoString* -mono_string_new_wrapper (const char *text) - -
    -

    -Parameters -

    text:
    pointer to utf8 characters.
    -Remarks -

    - Helper function to create a string object from text in the current domain. - -

    -
    -
    mono_string_chars
    - -
    gunichar2* -mono_string_chars (MonoString *s) - -
    -

    -Parameters -

    s:
    a MonoString
    -Remarks -

    - Returns a pointer to the UCS16 characters stored in the MonoString - -

    -
    -
    mono_string_length
    - -
    int -mono_string_length (MonoString *s) - -
    -

    -Parameters -

    s:
    MonoString
    -Remarks -

    - Returns the lenght in characters of the string - - - -

    Other Encodings

    - -

    These routines are used when coping with strings that come - from Mono's environment, and might be encoded in one or more - of the external encodings. - -

    For example, some file systems might historically contain a - mix of file names with both old and new encodings, typically - UTF8 for new files, and the old files would be encoded in an 8 - bit character set (ISO-8859-1 for example). - -

    These routines try a number of encodings, those specified - in the MONO_ENCODINGS environment variable and return - unicode strings that can be used internally. - -

    See the mono(1) man page for more details. - - -

    -
    mono_unicode_from_external
    - -
    gunichar2* -mono_unicode_from_external (const gchar *in, gsize *bytes) - -
    -

    -Parameters -

    in:
    pointers to the buffer.
    bytes:
    number of bytes in the string.
    -Remarks -

    - Tries to turn a NULL-terminated string into UTF16. - - First, see if it's valid UTF8, in which case just turn it directly - into UTF16. Next, run through the colon-separated encodings in - MONO_EXTERNAL_ENCODINGS and do an iconv conversion on each, - returning the first successful conversion to UTF16. If no - conversion succeeds, return NULL. - - Callers must free the returned string if not NULL. bytes holds the number - of bytes in the returned string, not including the terminator. - -

    -
    -
    mono_unicode_to_external
    - -
    gchar*mono_unicode_to_external (const gunichar2 *uni) - -
    -

    -Parameters -

    uni:
    an UTF16 string to conver to an external representation.
    -Remarks -

    - Turns NULL-terminated UTF16 into either UTF8, or the first - working item in MONO_EXTERNAL_ENCODINGS if set. If no conversions - work, then UTF8 is returned. - - Callers must free the returned string. - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-threads.html b/docs/deploy/mono-api-threads.html deleted file mode 100644 index 96fa796ab2..0000000000 --- a/docs/deploy/mono-api-threads.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - mono-api-threads.html - - - -

    Working with threads

    - -

    Thread API

    - -
    -
    mono_thread_attach
    - -
    Prototype: mono_thread_attach
    -

    - -

    -
    -
    mono_thread_create
    - -
    Prototype: mono_thread_create
    -

    - -

    -
    -
    mono_thread_current
    - -
    Prototype: mono_thread_current
    -

    - -

    -
    -
    mono_thread_detach
    - -
    Prototype: mono_thread_detach
    -

    - -

    -
    -
    mono_thread_exit
    - -
    Prototype: mono_thread_exit
    -

    - -

    -
    -
    mono_thread_manage
    - -
    Prototype: mono_thread_manage
    -

    - -

    -
    -
    mono_thread_new_init
    - -
    Prototype: mono_thread_new_init
    -

    - -

    -
    -
    mono_threads_get_default_stacksize
    - -
    Prototype: mono_threads_get_default_stacksize
    -

    - -

    -
    -
    mono_threads_install_cleanup
    - -
    Prototype: mono_threads_install_cleanup
    -

    - -

    -
    -
    mono_threads_set_default_stacksize
    - -
    Prototype: mono_threads_set_default_stacksize
    -

    - -

    -
    -
    mono_thread_stop
    - -
    Prototype: mono_thread_stop
    -

    - - -

    -
    -
    mono_thread_get_main
    - -
    Prototype: mono_thread_get_main
    -

    - -

    -
    -
    mono_thread_set_main
    - -
    void -mono_thread_set_main (MonoThread *thread) - -
    -

    -Parameters -

    thread:
    thread to set as the main thread
    -Remarks -

    - This function can be used to instruct the runtime to treat thread - as the main thread, ie, the thread that would normally execute the Main() - method. This basically means that at the end of thread, the runtime will - wait for the existing foreground threads to quit and other such details. - -

    -
    -
    mono_pthread_key_for_tls
    - -
    Prototype: mono_pthread_key_for_tls
    -

    - - -

    Monitors

    - - -
    -
    mono_monitor_enter
    - -
    Prototype: mono_monitor_enter
    -

    - -

    -
    -
    mono_monitor_exit
    - -
    Prototype: mono_monitor_exit
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-type.html b/docs/deploy/mono-api-type.html deleted file mode 100644 index 4364e7d2d6..0000000000 --- a/docs/deploy/mono-api-type.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - mono-api-type.html - - - -

    Type support

    - -

    Synopsis

    - -
    -#include <metadata/metadata.h> -#include <metadata/class.h> - -typedef struct _MonoType MonoType; - - - -MonoArrayType* mono_type_get_array_type (MonoType *type); -MonoClass* mono_type_get_class (MonoType *type); - - -char* mono_type_get_name (MonoType *type); -MonoMethodSignature* mono_type_get_signature (MonoType *type); -int mono_type_get_type (MonoType *type); - -gboolean mono_type_is_byref (MonoType *type); - - -guint32 mono_type_to_unmanaged (MonoType *type, - MonoMarshalSpec *mspec, - gboolean as_field; - - - -
    - -

    The MonoType represents the unmanaged version of - System.Type. - - -

    -
    mono_type_get_object
    - -
    Prototype: mono_type_get_object
    -

    - -

    -
    -
    mono_type_create_from_typespec
    - -
    Prototype: mono_type_create_from_typespec
    -

    - -

    -
    -
    mono_type_full_name
    - -
    Prototype: mono_type_full_name
    -

    - -

    -
    -
    mono_type_get_array_type
    - -
    MonoArrayType* -mono_type_get_array_type (MonoType *type) - -
    -

    -Parameters -

    type:
    the MonoType operated on
    -Returns -
    a MonoArrayType struct describing the array type that type - - represents. The info includes details such as rank, array element type - and the sizes and bounds of multidimensional arrays.
    -Remarks -

    - It is only valid to call this function if type is a MONO_TYPE_ARRAY. - - -

    -
    -
    mono_type_get_class
    - -
    MonoClass* -mono_type_get_class (MonoType *type) - -
    -

    -Parameters -

    type:
    the MonoType operated on
    -Returns -
    the MonoClass pointer that describes the class that type represents. -
    -Remarks -

    - It is only valid to call this function if type is a MONO_TYPE_CLASS or a - MONO_TYPE_VALUETYPE. For more general functionality, use mono_class_from_mono_type (), - instead - - -

    -
    -
    mono_type_get_desc
    - -
    Prototype: mono_type_get_desc
    -

    - -

    -
    -
    mono_type_get_modifiers
    - -
    Prototype: mono_type_get_modifiers
    -

    - -

    -
    -
    mono_type_get_name
    - -
    char* -mono_type_get_name (MonoType *type) - -
    -

    -Parameters -

    type:
    a type
    -Returns -
    the string representation for type as it would be represented in IL code. -
    - -
    -
    -
    mono_type_get_signature
    - -
    MonoMethodSignature* -mono_type_get_signature (MonoType *type) - -
    -

    -Parameters -

    type:
    the MonoType operated on
    -Returns -
    the MonoMethodSignature pointer that describes the signature - - of the function pointer type represents.
    -Remarks -

    - It is only valid to call this function if type is a MONO_TYPE_FNPTR. - - -

    -
    -
    mono_type_get_type
    - -
    int -mono_type_get_type (MonoType *type) - -
    -

    -Parameters -

    type:
    the MonoType operated on
    -Returns -
    the IL type value for type. This is one of the MonoTypeEnum - - enum members like MONO_TYPE_I4 or MONO_TYPE_STRING.
    - -
    -
    -
    mono_type_get_underlying_type
    - -
    Prototype: mono_type_get_underlying_type
    -

    - -

    -
    -
    mono_type_is_byref
    - -
    gboolean -mono_type_is_byref (MonoType *type) - -
    -

    -Parameters -

    type:
    the MonoType operated on
    -Returns -
    TRUE if type represents a type passed by reference, - - FALSE otherwise.
    - -
    -
    -
    mono_type_size
    - -
    Prototype: mono_type_size
    -

    - -

    -
    -
    mono_type_stack_size
    - -
    Prototype: mono_type_stack_size
    -

    - -

    -
    -
    mono_type_to_unmanaged
    - -
    guint32 -mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec, gboolean as_field, - gboolean unicode, MonoMarshalConv *conv) - -
    -

    -Returns -

    A MonoMarshalNative enumeration value (MONO_NATIVE_) value - - describing the underlying native reprensetation of the type. - -

    - In addition the value pointed by - "conv" will contain the kind of marshalling required for this - particular type one of the MONO_MARSHAL_CONV_ enumeration values.

    - -
    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-types.html b/docs/deploy/mono-api-types.html deleted file mode 100644 index 0774670f96..0000000000 --- a/docs/deploy/mono-api-types.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - mono-api-types.html - - - -

    Common core types

    - -

    These are accesor methods to retrieve the MonoClass - * handle for the various built-in CLI types. - - -

    -
    mono_get_object_class
    - -
    Prototype: mono_get_object_class
    -

    - -

    -
    -
    mono_get_int16_class
    - -
    Prototype: mono_get_int16_class
    -

    - -

    -
    -
    mono_get_int32_class
    - -
    Prototype: mono_get_int32_class
    -

    - -

    -
    -
    mono_get_int64_class
    - -
    Prototype: mono_get_int64_class
    -

    - -

    -
    -
    mono_get_double_class
    - -
    Prototype: mono_get_double_class
    -

    - -

    -
    -
    mono_get_enum_class
    - -
    Prototype: mono_get_enum_class
    -

    - -

    -
    -
    mono_get_intptr_class
    - -
    Prototype: mono_get_intptr_class
    -

    - -

    -
    -
    mono_get_sbyte_class
    - -
    Prototype: mono_get_sbyte_class
    -

    - -

    -
    -
    mono_get_single_class
    - -
    Prototype: mono_get_single_class
    -

    - -

    -
    -
    mono_get_string_class
    - -
    Prototype: mono_get_string_class
    -

    - -

    -
    -
    mono_get_thread_class
    - -
    Prototype: mono_get_thread_class
    -

    - -

    -
    -
    mono_get_uint16_class
    - -
    Prototype: mono_get_uint16_class
    -

    - -

    -
    -
    mono_get_uint32_class
    - -
    Prototype: mono_get_uint32_class
    -

    - -

    -
    -
    mono_get_uint64_class
    - -
    Prototype: mono_get_uint64_class
    -

    - -

    -
    -
    mono_get_uintptr_class
    - -
    Prototype: mono_get_uintptr_class
    -

    - -

    -
    -
    mono_get_void_class
    - -
    Prototype: mono_get_void_class
    -

    - -

    -
    -
    mono_get_array_class
    - -
    Prototype: mono_get_array_class
    -

    - -

    -
    -
    mono_get_boolean_class
    - -
    Prototype: mono_get_boolean_class
    -

    - -

    -
    -
    mono_get_byte_class
    - -
    Prototype: mono_get_byte_class
    -

    - -

    -
    -
    mono_get_char_class
    - -
    Prototype: mono_get_char_class
    -

    - - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-unsorted.html b/docs/deploy/mono-api-unsorted.html deleted file mode 100644 index cbf46050b6..0000000000 --- a/docs/deploy/mono-api-unsorted.html +++ /dev/null @@ -1,510 +0,0 @@ - - - - mono-api-unsorted.html - - - - - - -
    -
    mono_bounded_array_class_get
    - -
    MonoClass* -mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded) - -
    -

    -Parameters -

    element_class:
    element class
    rank:
    the dimension of the array class
    bounded:
    whenever the array has non-zero bounds
    -Returns -
    a class object describing the array with element type element_type and - - dimension rank.
    - -
    -
    -
    mono_check_corlib_version
    - -
    const char* -mono_check_corlib_version (void) - -
    -

    -Returns -

    NULL if the runtime will work with the corlib, or a g_malloc - - allocated string with the error otherwise.
    -Remarks -

    - Checks that the corlib that is loaded matches the version of this runtime. - - -

    -
    -
    mono_compile_method
    - -
    gpointer -mono_compile_method (MonoMethod *method) - -
    -

    -Parameters -

    method:
    The method to compile.
    -Remarks -

    - This JIT-compiles the method, and returns the pointer to the native code - produced. - -

    -
    -
    mono_config_for_assembly
    - -
    Prototype: mono_config_for_assembly
    -

    - -

    -
    -
    mono_dllmap_insert
    - -
    void -mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, const char *tdll, const char *tfunc) - -
    -

    -Parameters -

    assembly:
    if NULL, this is a global mapping, otherwise the remapping of the dynamic library will only apply to the specified assembly
    dll:
    The name of the external library, as it would be found in the DllImport declaration. If prefixed with 'i:' the matching of the library name is done without case sensitivity
    func:
    if not null, the mapping will only applied to the named function (the value of EntryPoint)
    tdll:
    The name of the library to map the specified dll if it matches.
    tfunc:
    if func is not NULL, the name of the function that replaces the invocation
    -Remarks -

    - LOCKING: Acquires the loader lock. - - This function is used to programatically add DllImport remapping in either - a specific assembly, or as a global remapping. This is done by remapping - references in a DllImport attribute from the dll library name into the tdll - name. If the dll name contains the prefix "i:", the comparison of the - library name is done without case sensitivity. - - If you pass func, this is the name of the EntryPoint in a DllImport if specified - or the name of the function as determined by DllImport. If you pass func, you - must also pass tfunc which is the name of the target function to invoke on a match. - - Example: - mono_dllmap_insert (NULL, "i:libdemo.dll", NULL, relocated_demo_path, NULL); - - The above will remap DllImport statments for "libdemo.dll" and "LIBDEMO.DLL" to - the contents of relocated_demo_path for all assemblies in the Mono process. - - NOTE: This can be called before the runtime is initialized, for example from - mono_config_parse (). - -

    -
    -
    mono_environment_exitcode_get
    - -
    Prototype: mono_environment_exitcode_get
    -

    - -

    -
    -
    mono_environment_exitcode_set
    - -
    Prototype: mono_environment_exitcode_set
    -

    - -

    -
    -
    mono_free_method
    - -
    Prototype: mono_free_method
    -

    - -

    -
    -
    mono_free_verify_list
    - -
    Prototype: mono_free_verify_list
    -

    - -

    -
    -
    mono_get_config_dir
    - -
    Prototype: mono_get_config_dir
    -

    - -

    -
    -
    mono_get_corlib
    - -
    Prototype: mono_get_corlib
    -

    - -

    -
    -
    mono_get_delegate_invoke
    - -
    MonoMethod* -mono_get_delegate_invoke (MonoClass *klass) - -
    -

    -Parameters -

    klass:
    The delegate class
    -Returns -
    the MonoMethod for the "Invoke" method in the delegate klass or NULL if klass is a broken delegate type -
    - -
    -
    -
    mono_get_method_full
    - -
    Prototype: mono_get_method_full
    -

    - -

    -
    -
    mono_get_method
    - -
    Prototype: mono_get_method
    -

    - -

    -
    -
    mono_get_root_domain
    - -
    MonoDomain* -mono_get_root_domain (void) - -
    -

    -Returns -

    the root appdomain, to obtain the current domain, use mono_domain_get () -
    -Remarks -

    - The root AppDomain is the initial domain created by the runtime when it is - initialized. Programs execute on this AppDomain, but can create new ones - later. Currently there is no unmanaged API to create new AppDomains, this - must be done from managed code. - - -

    -
    -
    mono_init_from_assembly
    - -
    MonoDomain* -mono_init_from_assembly (const char *domain_name, const char *filename) - -
    -

    -Parameters -

    domain_name:
    name to give to the initial domain
    filename:
    filename to load on startup
    -Returns -
    the initial domain. -
    -Remarks -

    - Used by the runtime, users should use mono_jit_init instead. - - Creates the initial application domain and initializes the mono_defaults - structure. - This function is guaranteed to not run any IL code. - The runtime is initialized using the runtime version required by the - provided executable. The version is determined by looking at the exe - configuration file and the version PE field) - - -

    -
    -
    mono_init
    - -
    MonoDomain* -mono_init (const char *domain_name) - -
    -

    -Returns -

    the initial domain. -
    -Remarks -

    - - Creates the initial application domain and initializes the mono_defaults - structure. - This function is guaranteed to not run any IL code. - The runtime is initialized using the default runtime version. - - -

    -
    -
    mono_init_version
    - -
    MonoDomain* -mono_init_version (const char *domain_name, const char *version) - -
    -

    -Returns -

    the initial domain. -
    -Remarks -

    - - Used by the runtime, users should use mono_jit_init instead. - -

    - Creates the initial application domain and initializes the mono_defaults - structure. - - This function is guaranteed to not run any IL code. - The runtime is initialized using the provided rutime version. - - -

    -
    -
    mono_jit_exec
    - -
    int -mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]) - -
    -

    -Parameters -

    assembly:
    reference to an assembly
    argc:
    argument count
    argv:
    argument vector
    -Remarks -

    - Start execution of a program. - -

    -
    -
    mono_lookup_internal_call
    - -
    Prototype: mono_lookup_internal_call
    -

    - -

    -
    -
    mono_lookup_pinvoke_call
    - -
    Prototype: mono_lookup_pinvoke_call
    -

    - -

    -
    -
    mono_main
    - -
    int -mono_main (int argc, char* argv[]) - -
    -

    -Parameters -

    argc:
    number of arguments in the argv array
    argv:
    array of strings containing the startup arguments
    -Remarks -

    - Launches the Mono JIT engine and parses all the command line options - in the same way that the mono command line VM would. - -

    -
    -
    mono_parse_default_optimizations
    - -
    Prototype: mono_parse_default_optimizations
    -

    - -

    -
    -
    mono_ptr_class_get
    - -
    Prototype: mono_ptr_class_get
    -

    - -

    -
    -
    mono_register_bundled_assemblies
    - -
    Prototype: mono_register_bundled_assemblies
    -

    - -

    -
    -
    mono_runtime_class_init
    - -
    Prototype: mono_runtime_class_init
    -

    - -

    -
    -
    mono_runtime_cleanup
    - -
    void -mono_runtime_cleanup (MonoDomain *domain) - -
    -

    -Parameters -

    domain:
    unused.
    -Remarks -

    - Internal routine. - - This must not be called while there are still running threads executing - managed code. - -

    -
    -
    mono_runtime_get_main_args
    - -
    MonoArray* -mono_runtime_get_main_args (void) - -
    -

    -Returns -

    a MonoArray with the arguments passed to the main program -
    - -
    -
    -
    mono_runtime_init
    - -
    void -mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb, - MonoThreadAttachCB attach_cb) - -
    -

    -Parameters -

    domain:
    domain returned by mono_init ()
    -Remarks -

    - Initialize the core AppDomain: this function will run also some - IL initialization code, so it needs the execution engine to be fully - operational. - - AppDomain.SetupInformation is set up in mono_runtime_exec_main, where - we know the entry_assembly. - - -

    -
    -
    mono_runtime_is_shutting_down
    - -
    gboolean -mono_runtime_is_shutting_down (void) - -
    -

    -Remarks -

    - Returns whether the runtime has been flagged for shutdown. - - This is consumed by the P:System.Environment.HasShutdownStarted - property. - - -

    -
    -
    mono_runtime_object_init
    - -
    Prototype: mono_runtime_object_init
    -

    - -

    -
    -
    mono_runtime_quit
    - -
    Prototype: mono_runtime_quit
    -

    - -

    -
    -
    mono_runtime_run_main
    - -
    int -mono_runtime_run_main (MonoMethod *method, int argc, char* argv[], - MonoObject **exc) - -
    -

    -Parameters -

    method:
    the method to start the application with (usually Main)
    argc:
    number of arguments from the command line
    argv:
    array of strings from the command line
    exc:
    excetption results
    -Remarks -

    - Execute a standard Main() method (argc/argv contains the - executable name). This method also sets the command line argument value - needed by System.Environment. - - -

    - -

    -
    -
    mono_table_info_get_rows
    - -
    Prototype: mono_table_info_get_rows
    -

    - -

    -
    -
    mono_upgrade_remote_class_wrapper
    - -
    Prototype: mono_upgrade_remote_class_wrapper
    -

    - -

    -
    -
    mono_verify_corlib
    - -
    Prototype: mono_verify_corlib
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-utils.html b/docs/deploy/mono-api-utils.html deleted file mode 100644 index c0f236e038..0000000000 --- a/docs/deploy/mono-api-utils.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - mono-api-utils.html - - - -

    Utility Methods

    - -

    Bitsets

    - -

    MonoBitsets are a set of routines used to manipulate sets - of bits. - - -

    -
    mono_bitset_alloc_size
    - -
    Prototype: mono_bitset_alloc_size
    -

    - -

    -
    -
    mono_bitset_clear
    - -
    Prototype: mono_bitset_clear
    -

    - -

    -
    -
    mono_bitset_clear_all
    - -
    Prototype: mono_bitset_clear_all
    -

    - -

    -
    -
    mono_bitset_clone
    - -
    Prototype: mono_bitset_clone
    -

    - -

    -
    -
    mono_bitset_copyto
    - -
    Prototype: mono_bitset_copyto
    -

    - -

    -
    -
    mono_bitset_count
    - -
    Prototype: mono_bitset_count
    -

    - -

    -
    -
    mono_bitset_equal
    - -
    Prototype: mono_bitset_equal
    -

    - -

    -
    -
    mono_bitset_find_first
    - -
    Prototype: mono_bitset_find_first
    -

    - -

    -
    -
    mono_bitset_find_last
    - -
    Prototype: mono_bitset_find_last
    -

    - -

    -
    -
    mono_bitset_find_start
    - -
    Prototype: mono_bitset_find_start
    -

    - -

    -
    -
    mono_bitset_foreach
    - -
    Prototype: mono_bitset_foreach
    -

    - -

    -
    -
    mono_bitset_free
    - -
    Prototype: mono_bitset_free
    -

    - -

    -
    -
    mono_bitset_intersection
    - -
    Prototype: mono_bitset_intersection
    -

    - -

    -
    -
    mono_bitset_invert
    - -
    Prototype: mono_bitset_invert
    -

    - -

    -
    -
    mono_bitset_mem_new
    - -
    Prototype: mono_bitset_mem_new
    -

    - -

    -
    -
    mono_bitset_new
    - -
    Prototype: mono_bitset_new
    -

    - -

    -
    -
    mono_bitset_set
    - -
    Prototype: mono_bitset_set
    -

    - -

    -
    -
    mono_bitset_set_all
    - -
    Prototype: mono_bitset_set_all
    -

    - -

    -
    -
    mono_bitset_size
    - -
    Prototype: mono_bitset_size
    -

    - -

    -
    -
    mono_bitset_sub
    - -
    Prototype: mono_bitset_sub
    -

    - -

    -
    -
    mono_bitset_test
    - -
    Prototype: mono_bitset_test
    -

    - -

    -
    -
    mono_bitset_test_bulk
    - -
    Prototype: mono_bitset_test_bulk
    -

    - -

    -
    -
    mono_bitset_union
    - -
    Prototype: mono_bitset_union
    -

    - -

    -
    -
    mono_bitset_find_first_unset
    - -
    Prototype: mono_bitset_find_first_unset
    -

    - -

    -
    -
    mono_bitset_intersection_2
    - -
    Prototype: mono_bitset_intersection_2
    -

    - - -

    Hashtables

    - -

    GHashTable is used when you need to store object - references into a hashtable, objects stored in a - MonoGHashTable are properly tracked by the garbage - collector. - -

    The MonoGHashTable data type has the same API as - the GLIB. - - -

    -
    mono_g_hash_table_destroy
    - -
    Prototype: mono_g_hash_table_destroy
    -

    - -

    -
    -
    mono_g_hash_table_foreach
    - -
    Prototype: mono_g_hash_table_foreach
    -

    - -

    -
    -
    mono_g_hash_table_foreach_remove
    - -
    Prototype: mono_g_hash_table_foreach_remove
    -

    - -

    -
    -
    mono_g_hash_table_foreach_steal
    - -
    Prototype: mono_g_hash_table_foreach_steal
    -

    - -

    -
    -
    mono_g_hash_table_insert
    - -
    Prototype: mono_g_hash_table_insert
    -

    - -

    -
    -
    mono_g_hash_table_lookup
    - -
    Prototype: mono_g_hash_table_lookup
    -

    - -

    -
    -
    mono_g_hash_table_lookup_extended
    - -
    Prototype: mono_g_hash_table_lookup_extended
    -

    - -

    -
    -
    mono_g_hash_table_new
    - -
    Prototype: mono_g_hash_table_new
    -

    - -

    -
    -
    mono_g_hash_table_new_full
    - -
    Prototype: mono_g_hash_table_new_full
    -

    - -

    -
    -
    mono_g_hash_table_remap
    - -
    Prototype: mono_g_hash_table_remap
    -

    - -

    -
    -
    mono_g_hash_table_remove
    - -
    Prototype: mono_g_hash_table_remove
    -

    - -

    -
    -
    mono_g_hash_table_replace
    - -
    Prototype: mono_g_hash_table_replace
    -

    - -

    -
    -
    mono_g_hash_table_size
    - -
    Prototype: mono_g_hash_table_size
    -

    - -

    -
    -
    mono_g_hash_table_steal
    - -
    Prototype: mono_g_hash_table_steal
    -

    - - -

    SHA1 Signatures

    - - -
    -
    mono_sha1_init
    - -
    Prototype: mono_sha1_init
    -

    - -

    -
    -
    mono_sha1_update
    - -
    Prototype: mono_sha1_update
    -

    - -

    -
    -
    mono_sha1_get_digest_from_file
    - -
    Prototype: mono_sha1_get_digest_from_file
    -

    - -

    -
    -
    mono_sha1_get_digest
    - -
    Prototype: mono_sha1_get_digest
    -

    - -

    -
    -
    mono_sha1_final
    - -
    Prototype: mono_sha1_final
    -

    - - -

    MD5 Signatures

    - - -
    -
    mono_md5_init
    - -
    Prototype: mono_md5_init
    -

    - -

    -
    -
    mono_md5_update
    - -
    Prototype: mono_md5_update
    -

    - -

    -
    -
    mono_md5_get_digest_from_file
    - -
    Prototype: mono_md5_get_digest_from_file
    -

    - -

    -
    -
    mono_md5_get_digest
    - -
    Prototype: mono_md5_get_digest
    -

    - -

    -
    -
    mono_md5_final
    - -
    Prototype: mono_md5_final
    -

    - - -

    -
    -
    mono_digest_get_public_token
    - -
    Prototype: mono_digest_get_public_token
    -

    - - -

    Memory Pools

    - -

    Memory pools are a convenient way of tracking memory - allocations that are used for one specific task, they are also - faster than using the standard memory allocation procedures, - as they are designed to be used only by a single thread at a - time. - -

    MonoMemPool objects are not thread safe, which - means that you should not share the objects across multiple - threads without providing proper locking around it (unlike - malloc and free which are thread safe). - -

    When a MonoMemPool is released with - mono_mempool_destroy all of the of the memory - allocated from that memory pool with - mono_mempool_alloc and mono_mempool_alloc0 - is released. - - -

    -
    mono_mempool_new
    - -
    MonoMemPool* -mono_mempool_new (void) - -
    -

    -Returns -

    a new memory pool. -
    - -
    -
    -
    mono_mempool_destroy
    - -
    void -mono_mempool_destroy (MonoMemPool *pool) - -
    -

    -Parameters -

    pool:
    the memory pool to destroy
    -Remarks -

    - Free all memory associated with this pool. - -

    -
    -
    mono_mempool_alloc
    - -
    gpointer -mono_mempool_alloc (MonoMemPool *pool, guint size) - -
    -

    -Parameters -

    pool:
    the momory pool to use
    size:
    size of the momory block
    -Returns -
    the address of a newly allocated memory block. -
    -Remarks -

    - Allocates a new block of memory in pool. - - -

    -
    -
    mono_mempool_alloc0
    - -
    gpointer -mono_mempool_alloc0 (MonoMemPool *pool, guint size) - -
    -

    -Remarks -

    - same as mono_mempool_alloc, but fills memory with zero. - -

    -
    -
    mono_mempool_empty
    - -
    Prototype: mono_mempool_empty
    -

    - -

    -
    -
    mono_mempool_invalidate
    - -
    void -mono_mempool_invalidate (MonoMemPool *pool) - -
    -

    -Parameters -

    pool:
    the memory pool to invalidate
    -Remarks -

    - Fill the memory associated with this pool to 0x2a (42). Useful for debugging. - -

    -
    -
    mono_mempool_stats
    - -
    void -mono_mempool_stats (MonoMemPool *pool) - -
    -

    -Parameters -

    pool:
    the momory pool we need stats for
    -Remarks -

    - Print a few stats about the mempool - -

    -
    -
    mono_mempool_contains_addr
    - -
    gboolean -mono_mempool_contains_addr (MonoMemPool *pool, - gpointer addr) - -
    -

    -Remarks -

    - Determines whenever ADDR is inside the memory used by the mempool. - - -

    JIT utilities

    - - -
    -
    mono_signbit_double
    - -
    Prototype: mono_signbit_double
    -

    - -

    -
    -
    mono_signbit_float
    - -
    Prototype: mono_signbit_float
    -

    - - -

    Disassembling Generated Code

    - -

    Routines used to debug the JIT-produced code. - - -

    -
    mono_disasm_code
    - -
    Prototype: mono_disasm_code
    -

    - -

    -
    -
    mono_disasm_code_one
    - -
    Prototype: mono_disasm_code_one
    -

    - - -

    Walking the Stack

    - - -
    -
    mono_walk_stack
    - -
    Prototype: mono_walk_stack
    -

    - -

    -
    -
    mono_stack_walk_no_il
    - -
    Prototype: mono_stack_walk_no_il
    -

    - - -

    Others

    - - -
    -
    mono_escape_uri_string
    - -
    Prototype: mono_escape_uri_string
    -

    - -

    - -
    \ No newline at end of file diff --git a/docs/deploy/mono-api-vm.html b/docs/deploy/mono-api-vm.html deleted file mode 100644 index d1dc657898..0000000000 --- a/docs/deploy/mono-api-vm.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - mono-api-vm.html - - - - - - \ No newline at end of file diff --git a/docs/deploy/mono-api-wapi.html b/docs/deploy/mono-api-wapi.html deleted file mode 100644 index 778f9f9731..0000000000 --- a/docs/deploy/mono-api-wapi.html +++ /dev/null @@ -1,1588 +0,0 @@ - - - - mono-api-wapi.html - - - -

    Windows Compatibility API

    - -

    Mono implements a small subset of the Win32 API for some - file system interaction, I/O, thread and process operations. - -

    On Windows, Mono uses directly the services provided by the - operating system. On other operating system it uses its own - implementation (referred to as the "io-layer" or "wapi"). - -

    Windows Compatibility API

    - - -
    -
    BindIoCompletionCallback
    - -
    Prototype: BindIoCompletionCallback
    -

    - -

    -
    -
    CloseHandle
    - -
    gboolean CloseHandle(gpointer handle) - -
    -

    -Parameters -

    handle:
    The handle to release
    -Remarks -

    - Closes and invalidates handle, releasing any resources it - consumes. When the last handle to a temporary or non-persistent - object is closed, that object can be deleted. Closing the same - handle twice is an error. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    closesocket
    - -
    Prototype: closesocket
    -

    - -

    -
    -
    CopyFile
    - -
    gboolean CopyFile (const gunichar2 *name, const gunichar2 *dest_name, - gboolean fail_if_exists) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode string, that names
    -Remarks -

    the file to be copied. - dest_name: a pointer to a NULL-terminated unicode string, that is the - new name for the file. - fail_if_exists: if TRUE and dest_name exists, the copy will fail. - - Copies file name to dest_name - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    CreateDirectory
    - -
    gboolean CreateDirectory (const gunichar2 *name, - WapiSecurityAttributes *security) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode string, that names
    -Remarks -

    the directory to be created. - security: ignored for now - - Creates directory name - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    CreateEvent
    - -
    gpointer CreateEvent(WapiSecurityAttributes *security G_GNUC_UNUSED, - gboolean manual, gboolean initial, - const gunichar2 *name G_GNUC_UNUSED) - -
    -

    -Parameters -

    security:
    Ignored for now.
    manual:
    Specifies whether the new event handle has manual or auto
    -Remarks -

    reset behaviour. - initial: Specifies whether the new event handle is initially - signalled or not. - name:Pointer to a string specifying the name of this name, or - %NULL. Currently ignored. - - Creates a new event handle. - - An event handle is signalled with SetEvent(). If the new handle is - a manual reset event handle, it remains signalled until it is reset - with ResetEvent(). An auto reset event remains signalled until a - single thread has waited for it, at which time the event handle is - automatically reset to unsignalled. - - Return value: A new handle, or %NULL on error. - -

    -
    -
    CreateFile
    - -
    gpointer CreateFile(const gunichar2 *name, guint32 fileaccess, - guint32 sharemode, WapiSecurityAttributes *security, - guint32 createmode, guint32 attrs, - gpointer template G_GNUC_UNUSED) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode string, that names
    -Remarks -

    the file or other object to create. - fileaccess: specifies the file access mode - sharemode: whether the file should be shared. This parameter is - currently ignored. - security: Ignored for now. - createmode: specifies whether to create a new file, whether to - overwrite an existing file, whether to truncate the file, etc. - attrs: specifies file attributes and flags. On win32 attributes - are characteristics of the file, not the handle, and are ignored - when an existing file is opened. Flags give the library hints on - how to process a file to optimise performance. - template: the handle of an open %GENERIC_READ file that specifies - attributes to apply to a newly created file, ignoring attrs. - Normally this parameter is NULL. This parameter is ignored when an - existing file is opened. - - Creates a new file handle. This only applies to normal files: - pipes are handled by CreatePipe(), and console handles are created - with GetStdHandle(). - - Return value: the new handle, or %INVALID_HANDLE_VALUE on error. - -

    -
    -
    CreateMutex
    - -
    gpointer CreateMutex(WapiSecurityAttributes *security G_GNUC_UNUSED, gboolean owned, - const gunichar2 *name) - -
    -

    -Parameters -

    security:
    Ignored for now.
    owned:
    If %TRUE, the mutex is created with the calling thread
    -Remarks -

    already owning the mutex. - name:Pointer to a string specifying the name of this mutex, or - %NULL. - - Creates a new mutex handle. A mutex is signalled when no thread - owns it. A thread acquires ownership of the mutex by waiting for - it with WaitForSingleObject() or WaitForMultipleObjects(). A - thread relinquishes ownership with ReleaseMutex(). - - A thread that owns a mutex can specify the same mutex in repeated - wait function calls without blocking. The thread must call - ReleaseMutex() an equal number of times to release the mutex. - - Return value: A new handle, or %NULL on error. - -

    -
    -
    CreatePipe
    - -
    Prototype: CreatePipe
    -

    - -

    -
    -
    CreateProcess
    - -
    Prototype: CreateProcess
    -

    - -

    -
    -
    CreateProcessWithLogonW
    - -
    Prototype: CreateProcessWithLogonW
    -

    - -

    -
    -
    CreateSemaphore
    - -
    gpointer CreateSemaphore(WapiSecurityAttributes *security G_GNUC_UNUSED, gint32 initial, gint32 max, const gunichar2 *name) - -
    -

    -Parameters -

    security:
    Ignored for now.
    initial:
    The initial count for the semaphore. The value must be
    -Remarks -

    greater than or equal to zero, and less than or equal to max. - max: The maximum count for this semaphore. The value must be - greater than zero. - name: Pointer to a string specifying the name of this semaphore, - or %NULL. Currently ignored. - - Creates a new semaphore handle. A semaphore is signalled when its - count is greater than zero, and unsignalled otherwise. The count - is decreased by one whenever a wait function releases a thread that - was waiting for the semaphore. The count is increased by calling - ReleaseSemaphore(). - - Return value: a new handle, or NULL - -

    -
    -
    CreateThread
    - -
    Prototype: CreateThread
    -

    - -

    -
    -
    DeleteCriticalSection
    - -
    Prototype: DeleteCriticalSection
    -

    - -

    -
    -
    DeleteFile
    - -
    gboolean DeleteFile(const gunichar2 *name) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode string, that names
    -Remarks -

    the file to be deleted. - - Deletes file name. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    DuplicateHandle
    - -
    Prototype: DuplicateHandle
    -

    - -

    -
    -
    EnterCriticalSection
    - -
    Prototype: EnterCriticalSection
    -

    - -

    -
    -
    EnumProcesses
    - -
    Prototype: EnumProcesses
    -

    - -

    -
    -
    EnumProcessModules
    - -
    Prototype: EnumProcessModules
    -

    - -

    -
    -
    errno_to_WSA
    - -
    Prototype: errno_to_WSA
    -

    - -

    -
    -
    ExitThread
    - -
    Prototype: ExitThread
    -

    - -

    -
    -
    FileTimeToSystemTime
    - -
    gboolean FileTimeToSystemTime(const WapiFileTime *file_time, - WapiSystemTime *system_time) - -
    -

    -Parameters -

    file_time:
    Points to a %WapiFileTime structure that contains the
    -Remarks -

    number of ticks to convert. - system_time: Points to a %WapiSystemTime structure to receive the - broken-out time. - - Converts a tick count into broken-out time values. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    FindClose
    - -
    gboolean FindClose (gpointer handle) - -
    -

    -Parameters -

    wapi_handle:
    the find handle to close.
    -Remarks -

    - Closes find handle wapi_handle - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    FindFirstFile
    - -
    Prototype: FindFirstFile
    -

    - -

    -
    -
    FindNextFile
    - -
    Prototype: FindNextFile
    -

    - -

    -
    -
    FlushFileBuffers
    - -
    gboolean FlushFileBuffers(gpointer handle) - -
    -

    -Parameters -

    handle:
    Handle to open file. The handle must have
    -Remarks -

    %GENERIC_WRITE access. - - Flushes buffers of the file and causes all unwritten data to - be written. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    FormatMessage
    - -
    Prototype: FormatMessage
    -

    - -

    -
    -
    GetCurrentDirectory
    - -
    extern guint32 GetCurrentDirectory (guint32 length, gunichar2 *buffer) - -
    -

    -Parameters -

    length:
    size of the buffer
    buffer:
    pointer to buffer that recieves path
    -Remarks -

    - Retrieves the current directory for the current process. - - Return value: number of characters in buffer on success, zero on failure - -

    -
    -
    GetCurrentProcess
    - -
    Prototype: GetCurrentProcess
    -

    - -

    -
    -
    GetCurrentProcessId
    - -
    Prototype: GetCurrentProcessId
    -

    - -

    -
    -
    GetCurrentThread
    - -
    Prototype: GetCurrentThread
    -

    - -

    -
    -
    GetCurrentThreadId
    - -
    gsize -GetCurrentThreadId (void) - -
    -

    -Remarks -

    - Looks up the thread ID of the current thread. This ID can be - passed to OpenThread() to create a new handle on this thread. - - Return value: the thread ID. NB this is defined as DWORD (ie 32 - bit) in the MS API, but we need to cope with 64 bit IDs for s390x - and amd64. This doesn't really break the API, it just embraces and - extends it on 64bit platforms :) - -

    -
    -
    GetDiskFreeSpaceEx
    - -
    Prototype: GetDiskFreeSpaceEx
    -

    - -

    -
    -
    GetDriveType
    - -
    Prototype: GetDriveType
    -

    - -

    -
    -
    GetExitCodeProcess
    - -
    Prototype: GetExitCodeProcess
    -

    - -

    -
    -
    GetExitCodeThread
    - -
    Prototype: GetExitCodeThread
    -

    - -

    -
    -
    GetFileAttributesEx
    - -
    gboolean GetFileAttributesEx (const gunichar2 *name, WapiGetFileExInfoLevels level, gpointer info) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode filename.
    level:
    must be GetFileExInfoStandard
    info:
    pointer to a WapiFileAttributesData structure
    -Remarks -

    - Gets attributes, size and filetimes for name; - - Return value: %TRUE on success, %FALSE on failure - -

    -
    -
    GetFileAttributes
    - -
    guint32 GetFileAttributes (const gunichar2 *name) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode filename.
    -Remarks -

    - Gets the attributes for name; - - Return value: %INVALID_FILE_ATTRIBUTES on failure - -

    -
    -
    GetFileSize
    - -
    guint32 GetFileSize(gpointer handle, guint32 *highsize) - -
    -

    -Parameters -

    handle:
    The file handle to query. The handle must have
    -Remarks -

    %GENERIC_READ or %GENERIC_WRITE access. - highsize: If non-%NULL, the high 32 bits of the file size are - stored here. - - Retrieves the size of the file handle. - - If the library is compiled without large file support, highsize - has its value set to zero on a successful return. - - Return value: On success, the low 32 bits of the file size. If - highsize is non-%NULL then the high 32 bits of the file size are - stored here. On failure %INVALID_FILE_SIZE is returned. - -

    -
    -
    GetFileTime
    - -
    gboolean GetFileTime(gpointer handle, WapiFileTime *create_time, - WapiFileTime *last_access, WapiFileTime *last_write) - -
    -

    -Parameters -

    handle:
    The file handle to query. The handle must have
    -Remarks -

    %GENERIC_READ access. - create_time: Points to a %WapiFileTime structure to receive the - number of ticks since the epoch that file was created. May be - %NULL. - last_access: Points to a %WapiFileTime structure to receive the - number of ticks since the epoch when file was last accessed. May be - %NULL. - last_write: Points to a %WapiFileTime structure to receive the - number of ticks since the epoch when file was last written to. May - be %NULL. - - Finds the number of ticks since the epoch that the file referenced - by handle was created, last accessed and last modified. A tick is - a 100 nanosecond interval. The epoch is Midnight, January 1 1601 - GMT. - - Create time isn't recorded on POSIX file systems or reported by - stat(2), so that time is guessed by returning the oldest of the - other times. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    GetFileType
    - -
    WapiFileType GetFileType(gpointer handle) - -
    -

    -Parameters -

    handle:
    The file handle to test.
    -Remarks -

    - Finds the type of file handle. - - Return value: %FILE_TYPE_UNKNOWN - the type of the file handle is - unknown. %FILE_TYPE_DISK - handle is a disk file. - %FILE_TYPE_CHAR - handle is a character device, such as a console. - %FILE_TYPE_PIPE - handle is a named or anonymous pipe. - -

    -
    -
    GetFileVersionInfo
    - -
    Prototype: GetFileVersionInfo
    -

    - -

    -
    -
    GetFileVersionInfoSize
    - -
    Prototype: GetFileVersionInfoSize
    -

    - -

    -
    -
    GetLastError
    - -
    guint32 GetLastError(void) - -
    -

    -Remarks -

    - Retrieves the last error that occurred in the calling thread. - - Return value: The error code for the last error that happened on - the calling thread. - -

    -
    -
    GetLogicalDriveStrings
    - -
    Prototype: GetLogicalDriveStrings
    -

    - -

    -
    -
    GetModuleBaseName
    - -
    Prototype: GetModuleBaseName
    -

    - -

    -
    -
    GetModuleFileNameEx
    - -
    Prototype: GetModuleFileNameEx
    -

    - -

    -
    -
    GetModuleInformation
    - -
    Prototype: GetModuleInformation
    -

    - -

    -
    -
    GetPriorityClass
    - -
    Prototype: GetPriorityClass
    -

    - -

    -
    -
    GetProcessId
    - -
    Prototype: GetProcessId
    -

    - -

    -
    -
    GetProcessTimes
    - -
    Prototype: GetProcessTimes
    -

    - -

    -
    -
    GetProcessWorkingSetSize
    - -
    Prototype: GetProcessWorkingSetSize
    -

    - -

    -
    -
    GetStdHandle
    - -
    -static mono_mutex_t stdhandle_mutex; - -gpointer GetStdHandle(WapiStdHandle stdhandle) - -
    -

    -Parameters -

    stdhandle:
    specifies the file descriptor
    -Remarks -

    - Returns a handle for stdin, stdout, or stderr. Always returns the - same handle for the same stdhandle. - - Return value: the handle, or %INVALID_HANDLE_VALUE on error - -

    -
    -
    GetSystemInfo
    - -
    Prototype: GetSystemInfo
    -

    - -

    -
    -
    GetTempPath
    - -
    Prototype: GetTempPath
    -

    - -

    -
    -
    GetThreadContext
    - -
    Prototype: GetThreadContext
    -

    - -

    -
    -
    GetTickCount
    - -
    Prototype: GetTickCount
    -

    - -

    -
    -
    ImpersonateLoggedOnUser
    - -
    Prototype: ImpersonateLoggedOnUser
    -

    - -

    -
    -
    InitializeCriticalSectionAndSpinCount
    - -
    Prototype: InitializeCriticalSectionAndSpinCount
    -

    - -

    -
    -
    InitializeCriticalSection
    - -
    Prototype: InitializeCriticalSection
    -

    - -

    -
    -
    ioctlsocket
    - -
    Prototype: ioctlsocket
    -

    - -

    -
    -
    LeaveCriticalSection
    - -
    Prototype: LeaveCriticalSection
    -

    - -

    -
    -
    LockFile
    - -
    Prototype: LockFile
    -

    - -

    -
    -
    MoveFile
    - -
    gboolean MoveFile (const gunichar2 *name, const gunichar2 *dest_name) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode string, that names
    -Remarks -

    the file to be moved. - dest_name: a pointer to a NULL-terminated unicode string, that is the - new name for the file. - - Renames file name to dest_name. - MoveFile sets ERROR_ALREADY_EXISTS if the destination exists, except - when it is the same file as the source. In that case it silently succeeds. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    OpenEvent
    - -
    Prototype: OpenEvent
    -

    - -

    -
    -
    OpenMutex
    - -
    Prototype: OpenMutex
    -

    - -

    -
    -
    OpenProcess
    - -
    Prototype: OpenProcess
    -

    - -

    -
    -
    OpenSemaphore
    - -
    Prototype: OpenSemaphore
    -

    - -

    -
    -
    OpenThread
    - -
    Prototype: OpenThread
    -

    - -

    -
    -
    PulseEvent
    - -
    gboolean PulseEvent(gpointer handle) - -
    -

    -Parameters -

    handle:
    The event handle.
    -Remarks -

    - Sets the event handle handle to the signalled state, and then - resets it to unsignalled after informing any waiting threads. - - If handle is a manual reset event, all waiting threads that can be - released immediately are released. handle is then reset. If - handle is an auto reset event, one waiting thread is released even - if multiple threads are waiting. - - Return value: %TRUE on success, %FALSE otherwise. (Currently only - ever returns %TRUE). - -

    -
    -
    QueryPerformanceCounter
    - -
    Prototype: QueryPerformanceCounter
    -

    - -

    -
    -
    QueryPerformanceFrequency
    - -
    Prototype: QueryPerformanceFrequency
    -

    - -

    -
    -
    QueueUserAPC
    - -
    Prototype: QueueUserAPC
    -

    - -

    -
    -
    ReadFile
    - -
    gboolean ReadFile(gpointer handle, gpointer buffer, guint32 numbytes, - guint32 *bytesread, WapiOverlapped *overlapped) - -
    -

    -Parameters -

    handle:
    The file handle to read from. The handle must have
    -Remarks -

    %GENERIC_READ access. - buffer: The buffer to store read data in - numbytes: The maximum number of bytes to read - bytesread: The actual number of bytes read is stored here. This - value can be zero if the handle is positioned at the end of the - file. - overlapped: points to a required %WapiOverlapped structure if - handle has the %FILE_FLAG_OVERLAPPED option set, should be NULL - otherwise. - - If handle does not have the %FILE_FLAG_OVERLAPPED option set, this - function reads up to numbytes bytes from the file from the current - file position, and stores them in buffer. If there are not enough - bytes left in the file, just the amount available will be read. - The actual number of bytes read is stored in bytesread. - - If handle has the %FILE_FLAG_OVERLAPPED option set, the current - file position is ignored and the read position is taken from data - in the overlapped structure. - - Return value: %TRUE if the read succeeds (even if no bytes were - read due to an attempt to read past the end of the file), %FALSE on - error. - -

    -
    -
    ReleaseMutex
    - -
    gboolean ReleaseMutex(gpointer handle) - -
    -

    -Parameters -

    handle:
    The mutex handle.
    -Remarks -

    - Releases ownership if the mutex handle handle. - - Return value: %TRUE on success, %FALSE otherwise. This function - fails if the calling thread does not own the mutex handle. - -

    -
    -
    ReleaseSemaphore
    - -
    gboolean ReleaseSemaphore(gpointer handle, gint32 count, gint32 *prevcount) - -
    -

    -Parameters -

    handle:
    The semaphore handle to release.
    count:
    The amount by which the semaphore's count should be
    -Remarks -

    increased. - prevcount: Pointer to a location to store the previous count of - the semaphore, or %NULL. - - Increases the count of semaphore handle by count. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    RemoveDirectory
    - -
    gboolean RemoveDirectory (const gunichar2 *name) - -
    -

    -Parameters -

    name:
    a pointer to a NULL-terminated unicode string, that names
    -Remarks -

    the directory to be removed. - - Removes directory name - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    ReplaceFile
    - -
    Prototype: ReplaceFile
    -

    - -

    -
    -
    ResetEvent
    - -
    gboolean ResetEvent(gpointer handle) - -
    -

    -Parameters -

    handle:
    The event handle.
    -Remarks -

    - Resets the event handle handle to the unsignalled state. - - Return value: %TRUE on success, %FALSE otherwise. (Currently only - ever returns %TRUE). - -

    -
    -
    ResumeThread
    - -
    Prototype: ResumeThread
    -

    - -

    -
    -
    RevertToSelf
    - -
    Prototype: RevertToSelf
    -

    - -

    -
    -
    SetCriticalSectionSpinCount
    - -
    Prototype: SetCriticalSectionSpinCount
    -

    - -

    -
    -
    SetCurrentDirectory
    - -
    extern gboolean SetCurrentDirectory (const gunichar2 *path) - -
    -

    -Parameters -

    path:
    path to new directory
    -Remarks -

    - Changes the directory path for the current process. - - Return value: %TRUE on success, %FALSE on failure. - -

    -
    -
    SetEndOfFile
    - -
    gboolean SetEndOfFile(gpointer handle) - -
    -

    -Parameters -

    handle:
    The file handle to set. The handle must have
    -Remarks -

    %GENERIC_WRITE access. - - Moves the end-of-file position to the current position of the file - pointer. This function is used to truncate or extend a file. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    SetEvent
    - -
    gboolean SetEvent(gpointer handle) - -
    -

    -Parameters -

    handle:
    The event handle
    -Remarks -

    - Sets the event handle handle to the signalled state. - - If handle is a manual reset event, it remains signalled until it - is reset with ResetEvent(). An auto reset event remains signalled - until a single thread has waited for it, at which time handle is - automatically reset to unsignalled. - - Return value: %TRUE on success, %FALSE otherwise. (Currently only - ever returns %TRUE). - -

    -
    -
    SetFileAttributes
    - -
    extern gboolean SetFileAttributes (const gunichar2 *name, guint32 attrs) - -
    -

    -Parameters -

    name:
    name of file
    attrs:
    attributes to set
    -Remarks -

    - Changes the attributes on a named file. - - Return value: %TRUE on success, %FALSE on failure. - -

    -
    -
    SetFilePointer
    - -
    guint32 SetFilePointer(gpointer handle, gint32 movedistance, - gint32 *highmovedistance, WapiSeekMethod method) - -
    -

    -Parameters -

    handle:
    The file handle to set. The handle must have
    -Remarks -

    %GENERIC_READ or %GENERIC_WRITE access. - movedistance: Low 32 bits of a signed value that specifies the - number of bytes to move the file pointer. - highmovedistance: Pointer to the high 32 bits of a signed value - that specifies the number of bytes to move the file pointer, or - %NULL. - method: The starting point for the file pointer move. - - Sets the file pointer of an open file. - - The distance to move the file pointer is calculated from - movedistance and highmovedistance: If highmovedistance is %NULL, - movedistance is the 32-bit signed value; otherwise, movedistance - is the low 32 bits and highmovedistance a pointer to the high 32 - bits of a 64 bit signed value. A positive distance moves the file - pointer forward from the position specified by method; a negative - distance moves the file pointer backward. - - If the library is compiled without large file support, - highmovedistance is ignored and its value is set to zero on a - successful return. - - Return value: On success, the low 32 bits of the new file pointer. - If highmovedistance is not %NULL, the high 32 bits of the new file - pointer are stored there. On failure, %INVALID_SET_FILE_POINTER. - -

    -
    -
    SetFileTime
    - -
    gboolean SetFileTime(gpointer handle, const WapiFileTime *create_time, - const WapiFileTime *last_access, - const WapiFileTime *last_write) - -
    -

    -Parameters -

    handle:
    The file handle to set. The handle must have
    -Remarks -

    %GENERIC_WRITE access. - create_time: Points to a %WapiFileTime structure that contains the - number of ticks since the epoch that the file was created. May be - %NULL. - last_access: Points to a %WapiFileTime structure that contains the - number of ticks since the epoch when the file was last accessed. - May be %NULL. - last_write: Points to a %WapiFileTime structure that contains the - number of ticks since the epoch when the file was last written to. - May be %NULL. - - Sets the number of ticks since the epoch that the file referenced - by handle was created, last accessed or last modified. A tick is - a 100 nanosecond interval. The epoch is Midnight, January 1 1601 - GMT. - - Create time isn't recorded on POSIX file systems, and is ignored. - - Return value: %TRUE on success, %FALSE otherwise. - -

    -
    -
    SetLastError
    - -
    void SetLastError(guint32 code) - -
    -

    -Parameters -

    code:
    The error code.
    -Remarks -

    - Sets the error code in the calling thread. - -

    -
    -
    SetPriorityClass
    - -
    Prototype: SetPriorityClass
    -

    - -

    -
    -
    SetProcessWorkingSetSize
    - -
    Prototype: SetProcessWorkingSetSize
    -

    - -

    -
    -
    ShellExecuteEx
    - -
    Prototype: ShellExecuteEx
    -

    - -

    -
    -
    SignalObjectAndWait
    - -
    guint32 SignalObjectAndWait(gpointer signal_handle, gpointer wait, - guint32 timeout, gboolean alertable) - -
    -

    -Parameters -

    signal_handle:
    An object to signal
    wait:
    An object to wait for
    timeout:
    The maximum time in milliseconds to wait for
    alertable:
    Specifies whether the function returnes when the system
    -Remarks -

    queues an I/O completion routine or an APC for the calling thread. - - Atomically signals signal and waits for wait to become signalled, - or timeout ms elapses. If timeout is zero, the object's state is - tested and the function returns immediately. If timeout is - %INFINITE, the function waits forever. - - signal can be a semaphore, mutex or event object. - - If alertable is %TRUE and the system queues an I/O completion - routine or an APC for the calling thread, the function returns and - the thread calls the completion routine or APC function. If - %FALSE, the function does not return, and the thread does not call - the completion routine or APC function. A completion routine is - queued when the ReadFileEx() or WriteFileEx() function in which it - was specified has completed. The calling thread is the thread that - initiated the read or write operation. An APC is queued when - QueueUserAPC() is called. Currently completion routines and APC - functions are not supported. - - Return value: %WAIT_ABANDONED - wait is a mutex that was not - released by the owning thread when it exited. Ownershop of the - mutex object is granted to the calling thread and the mutex is set - to nonsignalled. %WAIT_IO_COMPLETION - the wait was ended by one - or more user-mode asynchronous procedure calls queued to the - thread. %WAIT_OBJECT_0 - The state of wait is signalled. - %WAIT_TIMEOUT - The timeout interval elapsed and wait's state is - still not signalled. %WAIT_FAILED - an error occurred. - -

    -
    -
    SleepEx
    - -
    guint32 -SleepEx (guint32 ms, gboolean alertable) - -
    -

    -Parameters -

    ms:
    The time in milliseconds to suspend for
    alertable:
    if TRUE, the wait can be interrupted by an APC call
    -Remarks -

    - Suspends execution of the current thread for ms milliseconds. A - value of zero causes the thread to relinquish its time slice. A - value of %INFINITE causes an infinite delay. - -

    -
    -
    Sleep
    - -
    Prototype: Sleep
    -

    - -

    -
    -
    SuspendThread
    - -
    Prototype: SuspendThread
    -

    - -

    -
    -
    TerminateProcess
    - -
    Prototype: TerminateProcess
    -

    - -

    -
    -
    TlsAlloc
    - -
    Prototype: TlsAlloc
    -

    - -

    -
    -
    TlsFree
    - -
    Prototype: TlsFree
    -

    - -

    -
    -
    TlsGetValue
    - -
    Prototype: TlsGetValue
    -

    - -

    -
    -
    TlsSetValue
    - -
    Prototype: TlsSetValue
    -

    - -

    -
    -
    TransmitFile
    - -
    Prototype: TransmitFile
    -

    - -

    -
    -
    TryEnterCriticalSection
    - -
    Prototype: TryEnterCriticalSection
    -

    - -

    -
    -
    UnlockFile
    - -
    Prototype: UnlockFile
    -

    - -

    -
    -
    VerLanguageName
    - -
    Prototype: VerLanguageName
    -

    - -

    -
    -
    VerQueryValue
    - -
    Prototype: VerQueryValue
    -

    - -

    -
    -
    WaitForInputIdle
    - -
    guint32 WaitForInputIdle(gpointer handle, guint32 timeout) - -
    -

    -Parameters -

    handle:
    a handle to the process to wait for
    timeout:
    the maximum time in milliseconds to wait for
    -Remarks -

    - This function returns when either handle process is waiting - for input, or timeout ms elapses. If timeout is zero, the - process state is tested and the function returns immediately. - If timeout is %INFINITE, the function waits forever. - - Return value: 0 - handle process is waiting for input. - %WAIT_TIMEOUT - The timeout interval elapsed and - handle process is not waiting for input. %WAIT_FAILED - an error - occurred. - -

    -
    -
    WaitForMultipleObjectsEx
    - -
    guint32 WaitForMultipleObjectsEx(guint32 numobjects, gpointer *handles, - gboolean waitall, guint32 timeout, - gboolean alertable) - -
    -

    -Parameters -

    numobjects:
    The number of objects in handles. The maximum allowed
    -Remarks -

    is %MAXIMUM_WAIT_OBJECTS. - handles: An array of object handles. Duplicates are not allowed. - waitall: If %TRUE, this function waits until all of the handles - are signalled. If %FALSE, this function returns when any object is - signalled. - timeout: The maximum time in milliseconds to wait for. - alertable: if TRUE, the wait can be interrupted by an APC call - -

    - This function returns when either one or more of handles is - signalled, or timeout ms elapses. If timeout is zero, the state - of each item of handles is tested and the function returns - immediately. If timeout is %INFINITE, the function waits forever. - - Return value: %WAIT_OBJECT_0 to %WAIT_OBJECT_0 + numobjects - 1 - - if waitall is %TRUE, indicates that all objects are signalled. If - waitall is %FALSE, the return value minus %WAIT_OBJECT_0 indicates - the first index into handles of the objects that are signalled. - %WAIT_ABANDONED_0 to %WAIT_ABANDONED_0 + numobjects - 1 - if - waitall is %TRUE, indicates that all objects are signalled, and at - least one object is an abandoned mutex object (See - WaitForSingleObject() for a description of abandoned mutexes.) If - waitall is %FALSE, the return value minus %WAIT_ABANDONED_0 - indicates the first index into handles of an abandoned mutex. - %WAIT_TIMEOUT - The timeout interval elapsed and no objects in - handles are signalled. %WAIT_FAILED - an error occurred. - %WAIT_IO_COMPLETION - the wait was ended by an APC. - -

    -
    -
    WaitForMultipleObjects
    - -
    Prototype: WaitForMultipleObjects
    -

    - -

    -
    -
    WaitForSingleObjectEx
    - -
    guint32 WaitForSingleObjectEx(gpointer handle, guint32 timeout, - gboolean alertable) - -
    -

    -Parameters -

    handle:
    an object to wait for
    timeout:
    the maximum time in milliseconds to wait for
    alertable:
    if TRUE, the wait can be interrupted by an APC call
    -Remarks -

    - This function returns when either handle is signalled, or timeout - ms elapses. If timeout is zero, the object's state is tested and - the function returns immediately. If timeout is %INFINITE, the - function waits forever. - - Return value: %WAIT_ABANDONED - handle is a mutex that was not - released by the owning thread when it exited. Ownership of the - mutex object is granted to the calling thread and the mutex is set - to nonsignalled. %WAIT_OBJECT_0 - The state of handle is - signalled. %WAIT_TIMEOUT - The timeout interval elapsed and - handle's state is still not signalled. %WAIT_FAILED - an error - occurred. %WAIT_IO_COMPLETION - the wait was ended by an APC. - -

    -
    -
    WaitForSingleObject
    - -
    Prototype: WaitForSingleObject
    -

    - -

    -
    -
    WriteFile
    - -
    gboolean WriteFile(gpointer handle, gconstpointer buffer, guint32 numbytes, - guint32 *byteswritten, WapiOverlapped *overlapped) - -
    -

    -Parameters -

    handle:
    The file handle to write to. The handle must have
    -Remarks -

    %GENERIC_WRITE access. - buffer: The buffer to read data from. - numbytes: The maximum number of bytes to write. - byteswritten: The actual number of bytes written is stored here. - If the handle is positioned at the file end, the length of the file - is extended. This parameter may be %NULL. - overlapped: points to a required %WapiOverlapped structure if - handle has the %FILE_FLAG_OVERLAPPED option set, should be NULL - otherwise. - - If handle does not have the %FILE_FLAG_OVERLAPPED option set, this - function writes up to numbytes bytes from buffer to the file at - the current file position. If handle is positioned at the end of - the file, the file is extended. The actual number of bytes written - is stored in byteswritten. - - If handle has the %FILE_FLAG_OVERLAPPED option set, the current - file position is ignored and the write position is taken from data - in the overlapped structure. - - Return value: %TRUE if the write succeeds, %FALSE on error. - -

    -
    -
    WSACleanup
    - -
    Prototype: WSACleanup
    -

    - -

    -
    -
    WSAGetLastError
    - -
    Prototype: WSAGetLastError
    -

    - -

    -
    -
    WSAIoctl
    - -
    Prototype: WSAIoctl
    -

    - -

    -
    -
    WSARecv
    - -
    Prototype: WSARecv
    -

    - -

    -
    -
    WSASend
    - -
    Prototype: WSASend
    -

    - -

    -
    -
    WSASetLastError
    - -
    Prototype: WSASetLastError
    -

    - -

    -
    -
    WSAStartup
    - -
    Prototype: WSAStartup
    -

    - - -

    Extended APIs

    - -

    The extended APIs provide access to a few internals of the - WAPI stack that are not exposed through the standard Win32 - APIs. - - -

    -
    mono_once
    - -
    Prototype: mono_once
    -

    - -

    -
    -
    wapi_clear_interruption
    - -
    Prototype: wapi_clear_interruption
    -

    - -

    -
    -
    wapi_current_thread_desc
    - -
    Prototype: wapi_current_thread_desc
    -

    - -

    -
    -
    wapi_interrupt_thread
    - -
    Prototype: wapi_interrupt_thread
    -

    - -

    -
    -
    wapi_self_interrupt
    - -
    Prototype: wapi_self_interrupt
    -

    - -

    -
    -
    wapi_thread_clear_wait_handle
    - -
    void -wapi_thread_clear_wait_handle (gpointer handle) - -
    -

    -Remarks -

    - Clear the wait handle of the current thread. - -

    - -
    \ No newline at end of file diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 29b45d2162..8e91838d7a 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -34,7 +34,7 @@ static class Consts // Use these assembly version constants to make code more maintainable. // - public const string MonoVersion = "3.12.0.0"; + public const string MonoVersion = "3.12.1.0"; public const string MonoCompany = "Mono development team"; public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoCopyright = "(c) Various Mono authors"; diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs index b8eb7ecacf..13573cbaab 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs @@ -116,14 +116,14 @@ namespace Mono.Security.Protocol.Tls scs.Add((0x00 << 0x08) | 0x09, "TLS_RSA_WITH_DES_CBC_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, false, true, 8, 8, 56, 8, 8); // Supported exportable ciphers - scs.Add((0x00 << 0x08) | 0x03, "TLS_RSA_EXPORT_WITH_RC4_40_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 5, 16, 40, 0, 0); - scs.Add((0x00 << 0x08) | 0x06, "TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 16, 40, 8, 8); - scs.Add((0x00 << 0x08) | 0x08, "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 8, 40, 8, 8); - scs.Add((0x00 << 0x08) | 0x60, "TLS_RSA_EXPORT_WITH_RC4_56_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); - scs.Add((0x00 << 0x08) | 0x61, "TLS_RSA_EXPORT_WITH_RC2_CBC_56_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 7, 16, 56, 8, 8); + // scs.Add((0x00 << 0x08) | 0x03, "TLS_RSA_EXPORT_WITH_RC4_40_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 5, 16, 40, 0, 0); + // scs.Add((0x00 << 0x08) | 0x06, "TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 16, 40, 8, 8); + // scs.Add((0x00 << 0x08) | 0x08, "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 8, 40, 8, 8); + // scs.Add((0x00 << 0x08) | 0x60, "TLS_RSA_EXPORT_WITH_RC4_56_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); + // scs.Add((0x00 << 0x08) | 0x61, "TLS_RSA_EXPORT_WITH_RC2_CBC_56_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 7, 16, 56, 8, 8); // 56 bits but we use 64 bits because of parity (DES is really 56 bits) - scs.Add((0x00 << 0x08) | 0x62, "TLS_RSA_EXPORT_WITH_DES_CBC_56_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 8, 8, 64, 8, 8); - scs.Add((0x00 << 0x08) | 0x64, "TLS_RSA_EXPORT_WITH_RC4_56_SHA", CipherAlgorithmType.Rc4, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); + // scs.Add((0x00 << 0x08) | 0x62, "TLS_RSA_EXPORT_WITH_DES_CBC_56_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 8, 8, 64, 8, 8); + // scs.Add((0x00 << 0x08) | 0x64, "TLS_RSA_EXPORT_WITH_RC4_56_SHA", CipherAlgorithmType.Rc4, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); // Default CipherSuite // scs.Add(0, "TLS_NULL_WITH_NULL_NULL", CipherAlgorithmType.None, HashAlgorithmType.None, ExchangeAlgorithmType.None, true, false, 0, 0, 0, 0, 0); @@ -195,14 +195,14 @@ namespace Mono.Security.Protocol.Tls scs.Add((0x00 << 0x08) | 0x09, "SSL_RSA_WITH_DES_CBC_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, false, true, 8, 8, 56, 8, 8); // Supported exportable ciphers - scs.Add((0x00 << 0x08) | 0x03, "SSL_RSA_EXPORT_WITH_RC4_40_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 5, 16, 40, 0, 0); - scs.Add((0x00 << 0x08) | 0x06, "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 16, 40, 8, 8); - scs.Add((0x00 << 0x08) | 0x08, "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 8, 40, 8, 8); - scs.Add((0x00 << 0x08) | 0x60, "SSL_RSA_EXPORT_WITH_RC4_56_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); - scs.Add((0x00 << 0x08) | 0x61, "SSL_RSA_EXPORT_WITH_RC2_CBC_56_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 7, 16, 56, 8, 8); + // scs.Add((0x00 << 0x08) | 0x03, "SSL_RSA_EXPORT_WITH_RC4_40_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 5, 16, 40, 0, 0); + // scs.Add((0x00 << 0x08) | 0x06, "SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 16, 40, 8, 8); + // scs.Add((0x00 << 0x08) | 0x08, "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 5, 8, 40, 8, 8); + // scs.Add((0x00 << 0x08) | 0x60, "SSL_RSA_EXPORT_WITH_RC4_56_MD5", CipherAlgorithmType.Rc4, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); + // scs.Add((0x00 << 0x08) | 0x61, "SSL_RSA_EXPORT_WITH_RC2_CBC_56_MD5", CipherAlgorithmType.Rc2, HashAlgorithmType.Md5, ExchangeAlgorithmType.RsaKeyX, true, true, 7, 16, 56, 8, 8); // 56 bits but we use 64 bits because of parity (DES is really 56 bits) - scs.Add((0x00 << 0x08) | 0x62, "SSL_RSA_EXPORT_WITH_DES_CBC_56_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 8, 8, 64, 8, 8); - scs.Add((0x00 << 0x08) | 0x64, "SSL_RSA_EXPORT_WITH_RC4_56_SHA", CipherAlgorithmType.Rc4, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); + // scs.Add((0x00 << 0x08) | 0x62, "SSL_RSA_EXPORT_WITH_DES_CBC_56_SHA", CipherAlgorithmType.Des, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, true, 8, 8, 64, 8, 8); + // scs.Add((0x00 << 0x08) | 0x64, "SSL_RSA_EXPORT_WITH_RC4_56_SHA", CipherAlgorithmType.Rc4, HashAlgorithmType.Sha1, ExchangeAlgorithmType.RsaKeyX, true, false, 7, 16, 56, 0, 0); // Default CipherSuite // scs.Add(0, "SSL_NULL_WITH_NULL_NULL", CipherAlgorithmType.None, HashAlgorithmType.None, true, false, 0, 0, 0, 0, 0); diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs index 7cece5060e..0602e70275 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs @@ -129,6 +129,7 @@ namespace Mono.Security.Protocol.Tls HandshakeType type, byte[] buffer) { ClientContext context = (ClientContext)this.context; + var last = context.LastHandshakeMsg; switch (type) { @@ -148,23 +149,37 @@ namespace Mono.Security.Protocol.Tls return null; case HandshakeType.ServerHello: + if (last != HandshakeType.HelloRequest) + break; return new TlsServerHello(this.context, buffer); + // Optional case HandshakeType.Certificate: + if (last != HandshakeType.ServerHello) + break; return new TlsServerCertificate(this.context, buffer); - case HandshakeType.ServerKeyExchange: - return new TlsServerKeyExchange(this.context, buffer); - + // Optional case HandshakeType.CertificateRequest: - return new TlsServerCertificateRequest(this.context, buffer); + if (last == HandshakeType.ServerKeyExchange || last == HandshakeType.Certificate) + return new TlsServerCertificateRequest(this.context, buffer); + break; case HandshakeType.ServerHelloDone: - return new TlsServerHelloDone(this.context, buffer); + if (last == HandshakeType.CertificateRequest || last == HandshakeType.Certificate || last == HandshakeType.ServerHello) + return new TlsServerHelloDone(this.context, buffer); + break; case HandshakeType.Finished: - return new TlsServerFinished(this.context, buffer); - + // depends if a full (ServerHelloDone) or an abbreviated handshake (ServerHello) is being done + bool check = context.AbbreviatedHandshake ? (last == HandshakeType.ServerHello) : (last == HandshakeType.ServerHelloDone); + // ChangeCipherSpecDone is not an handshake message (it's a content type) but still needs to be happens before finished + if (check && context.ChangeCipherSpecDone) { + context.ChangeCipherSpecDone = false; + return new TlsServerFinished (this.context, buffer); + } + break; + default: throw new TlsException( AlertDescription.UnexpectedMessage, @@ -172,6 +187,7 @@ namespace Mono.Security.Protocol.Tls "Unknown server handshake message received ({0})", type.ToString())); } + throw new TlsException (AlertDescription.HandshakeFailiure, String.Format ("Protocol error, unexpected protocol transition from {0} to {1}", last, type)); } #endregion diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs index b4caf28b5c..3923daf1a8 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/Context.cs @@ -122,6 +122,8 @@ namespace Mono.Security.Protocol.Tls set { this.protocolNegotiated = value; } } + public bool ChangeCipherSpecDone { get; set; } + public SecurityProtocolType SecurityProtocol { get diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs index 166f12f0d2..e857e70882 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs @@ -88,6 +88,8 @@ namespace Mono.Security.Protocol.Tls } else { ctx.StartSwitchingSecurityParameters (false); } + + ctx.ChangeCipherSpecDone = true; } public virtual HandshakeMessage GetMessage(HandshakeType type) @@ -348,9 +350,6 @@ namespace Mono.Security.Protocol.Tls // Try to read the Record Content Type int type = internalResult.InitialBuffer[0]; - // Set last handshake message received to None - this.context.LastHandshakeMsg = HandshakeType.ClientHello; - ContentType contentType = (ContentType)type; byte[] buffer = this.ReadRecordBuffer(type, record); if (buffer == null) @@ -458,9 +457,6 @@ namespace Mono.Security.Protocol.Tls // Try to read the Record Content Type int type = recordTypeBuffer[0]; - // Set last handshake message received to None - this.context.LastHandshakeMsg = HandshakeType.ClientHello; - ContentType contentType = (ContentType)type; byte[] buffer = this.ReadRecordBuffer(type, record); if (buffer == null) @@ -523,87 +519,11 @@ namespace Mono.Security.Protocol.Tls private byte[] ReadRecordBuffer (int contentType, Stream record) { - switch (contentType) - { - case 0x80: - return this.ReadClientHelloV2(record); - - default: - if (!Enum.IsDefined(typeof(ContentType), (ContentType)contentType)) - { - throw new TlsException(AlertDescription.DecodeError); - } - return this.ReadStandardRecordBuffer(record); - } - } - - private byte[] ReadClientHelloV2 (Stream record) - { - int msgLength = record.ReadByte (); - // process further only if the whole record is available - if (record.CanSeek && (msgLength + 1 > record.Length)) - { - return null; - } - - byte[] message = new byte[msgLength]; - record.Read (message, 0, msgLength); - - int msgType = message [0]; - if (msgType != 1) - { - throw new TlsException(AlertDescription.DecodeError); - } - int protocol = (message [1] << 8 | message [2]); - int cipherSpecLength = (message [3] << 8 | message [4]); - int sessionIdLength = (message [5] << 8 | message [6]); - int challengeLength = (message [7] << 8 | message [8]); - int length = (challengeLength > 32) ? 32 : challengeLength; - - // Read CipherSpecs - byte[] cipherSpecV2 = new byte[cipherSpecLength]; - Buffer.BlockCopy (message, 9, cipherSpecV2, 0, cipherSpecLength); - - // Read session ID - byte[] sessionId = new byte[sessionIdLength]; - Buffer.BlockCopy (message, 9 + cipherSpecLength, sessionId, 0, sessionIdLength); - - // Read challenge ID - byte[] challenge = new byte[challengeLength]; - Buffer.BlockCopy (message, 9 + cipherSpecLength + sessionIdLength, challenge, 0, challengeLength); - - if (challengeLength < 16 || cipherSpecLength == 0 || (cipherSpecLength % 3) != 0) + if (!Enum.IsDefined(typeof(ContentType), (ContentType)contentType)) { throw new TlsException(AlertDescription.DecodeError); } - // Updated the Session ID - if (sessionId.Length > 0) - { - this.context.SessionId = sessionId; - } - - // Update the protocol version - this.Context.ChangeProtocol((short)protocol); - - // Select the Cipher suite - this.ProcessCipherSpecV2Buffer(this.Context.SecurityProtocol, cipherSpecV2); - - // Updated the Client Random - this.context.ClientRandom = new byte [32]; // Always 32 - // 1. if challenge is bigger than 32 bytes only use the last 32 bytes - // 2. right justify (0) challenge in ClientRandom if less than 32 - Buffer.BlockCopy (challenge, challenge.Length - length, this.context.ClientRandom, 32 - length, length); - - // Set - this.context.LastHandshakeMsg = HandshakeType.ClientHello; - this.context.ProtocolNegotiated = true; - - return message; - } - - private byte[] ReadStandardRecordBuffer (Stream record) - { byte[] header = new byte[4]; if (record.Read (header, 0, 4) != 4) throw new TlsException ("buffer underrun"); @@ -1031,96 +951,5 @@ namespace Mono.Security.Protocol.Tls } #endregion - - #region CipherSpecV2 processing - - private void ProcessCipherSpecV2Buffer (SecurityProtocolType protocol, byte[] buffer) - { - TlsStream codes = new TlsStream(buffer); - - string prefix = (protocol == SecurityProtocolType.Ssl3) ? "SSL_" : "TLS_"; - - while (codes.Position < codes.Length) - { - byte check = codes.ReadByte(); - - if (check == 0) - { - // SSL/TLS cipher spec - short code = codes.ReadInt16(); - int index = this.Context.SupportedCiphers.IndexOf(code); - if (index != -1) - { - this.Context.Negotiating.Cipher = this.Context.SupportedCiphers[index]; - break; - } - } - else - { - byte[] tmp = new byte[2]; - codes.Read(tmp, 0, tmp.Length); - - int tmpCode = ((check & 0xff) << 16) | ((tmp[0] & 0xff) << 8) | (tmp[1] & 0xff); - CipherSuite cipher = this.MapV2CipherCode(prefix, tmpCode); - - if (cipher != null) - { - this.Context.Negotiating.Cipher = cipher; - break; - } - } - } - - if (this.Context.Negotiating == null) - { - throw new TlsException(AlertDescription.InsuficientSecurity, "Insuficient Security"); - } - } - - private CipherSuite MapV2CipherCode(string prefix, int code) - { - try - { - switch (code) - { - case 65664: - // TLS_RC4_128_WITH_MD5 - return this.Context.SupportedCiphers[prefix + "RSA_WITH_RC4_128_MD5"]; - - case 131200: - // TLS_RC4_128_EXPORT40_WITH_MD5 - return this.Context.SupportedCiphers[prefix + "RSA_EXPORT_WITH_RC4_40_MD5"]; - - case 196736: - // TLS_RC2_CBC_128_CBC_WITH_MD5 - return this.Context.SupportedCiphers[prefix + "RSA_EXPORT_WITH_RC2_CBC_40_MD5"]; - - case 262272: - // TLS_RC2_CBC_128_CBC_EXPORT40_WITH_MD5 - return this.Context.SupportedCiphers[prefix + "RSA_EXPORT_WITH_RC2_CBC_40_MD5"]; - - case 327808: - // TLS_IDEA_128_CBC_WITH_MD5 - return null; - - case 393280: - // TLS_DES_64_CBC_WITH_MD5 - return null; - - case 458944: - // TLS_DES_192_EDE3_CBC_WITH_MD5 - return null; - - default: - return null; - } - } - catch - { - return null; - } - } - - #endregion } } diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs index 6e316dc365..31c2547902 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs @@ -33,6 +33,8 @@ namespace Mono.Security.Protocol.Tls { internal class ServerRecordProtocol : RecordProtocol { + TlsClientCertificate cert; + #region Constructors public ServerRecordProtocol( @@ -93,30 +95,45 @@ namespace Mono.Security.Protocol.Tls private HandshakeMessage createClientHandshakeMessage( HandshakeType type, byte[] buffer) { + var last = context.LastHandshakeMsg; switch (type) { case HandshakeType.ClientHello: return new TlsClientHello(this.context, buffer); case HandshakeType.Certificate: - return new TlsClientCertificate(this.context, buffer); + if (last != HandshakeType.ClientHello) + break; + cert = new TlsClientCertificate(this.context, buffer); + return cert; case HandshakeType.ClientKeyExchange: - return new TlsClientKeyExchange(this.context, buffer); + if (last == HandshakeType.ClientHello || last == HandshakeType.Certificate) + return new TlsClientKeyExchange(this.context, buffer); + break; case HandshakeType.CertificateVerify: - return new TlsClientCertificateVerify(this.context, buffer); + if (last == HandshakeType.ClientKeyExchange && cert != null) + return new TlsClientCertificateVerify(this.context, buffer); + break; case HandshakeType.Finished: - return new TlsClientFinished(this.context, buffer); - + // Certificates are optional, but if provided, they should send a CertificateVerify + bool check = (cert == null) ? (last == HandshakeType.ClientKeyExchange) : (last == HandshakeType.CertificateVerify); + // ChangeCipherSpecDone is not an handshake message (it's a content type) but still needs to be happens before finished + if (check && context.ChangeCipherSpecDone) { + context.ChangeCipherSpecDone = false; + return new TlsClientFinished(this.context, buffer); + } + break; + default: - throw new TlsException( - AlertDescription.UnexpectedMessage, - String.Format(CultureInfo.CurrentUICulture, - "Unknown server handshake message received ({0})", - type.ToString())); + throw new TlsException(AlertDescription.UnexpectedMessage, String.Format(CultureInfo.CurrentUICulture, + "Unknown server handshake message received ({0})", + type.ToString())); + break; } + throw new TlsException (AlertDescription.HandshakeFailiure, String.Format ("Protocol error, unexpected protocol transition from {0} to {1}", last, type)); } private HandshakeMessage createServerHandshakeMessage( diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs index ae9b9d56c1..da95ed15e5 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs @@ -190,59 +190,15 @@ namespace Mono.Security.Protocol.Tls this.Context.ClientWriteKey = keyBlock.ReadBytes(this.KeyMaterialSize); this.Context.ServerWriteKey = keyBlock.ReadBytes(this.KeyMaterialSize); - if (!this.IsExportable) + if (this.IvSize != 0) { - if (this.IvSize != 0) - { - this.Context.ClientWriteIV = keyBlock.ReadBytes(this.IvSize); - this.Context.ServerWriteIV = keyBlock.ReadBytes(this.IvSize); - } - else - { - this.Context.ClientWriteIV = CipherSuite.EmptyArray; - this.Context.ServerWriteIV = CipherSuite.EmptyArray; - } + this.Context.ClientWriteIV = keyBlock.ReadBytes(this.IvSize); + this.Context.ServerWriteIV = keyBlock.ReadBytes(this.IvSize); } else { - HashAlgorithm md5 = MD5.Create(); - - int keySize = (md5.HashSize >> 3); //in bytes not bits - byte[] temp = new byte [keySize]; - - // Generate final write keys - md5.TransformBlock(this.Context.ClientWriteKey, 0, this.Context.ClientWriteKey.Length, temp, 0); - md5.TransformFinalBlock(this.Context.RandomCS, 0, this.Context.RandomCS.Length); - byte[] finalClientWriteKey = new byte[this.ExpandedKeyMaterialSize]; - Buffer.BlockCopy(md5.Hash, 0, finalClientWriteKey, 0, this.ExpandedKeyMaterialSize); - - md5.Initialize(); - md5.TransformBlock(this.Context.ServerWriteKey, 0, this.Context.ServerWriteKey.Length, temp, 0); - md5.TransformFinalBlock(this.Context.RandomSC, 0, this.Context.RandomSC.Length); - byte[] finalServerWriteKey = new byte[this.ExpandedKeyMaterialSize]; - Buffer.BlockCopy(md5.Hash, 0, finalServerWriteKey, 0, this.ExpandedKeyMaterialSize); - - this.Context.ClientWriteKey = finalClientWriteKey; - this.Context.ServerWriteKey = finalServerWriteKey; - - // Generate IV keys - if (this.IvSize > 0) - { - md5.Initialize(); - temp = md5.ComputeHash(this.Context.RandomCS, 0, this.Context.RandomCS.Length); - this.Context.ClientWriteIV = new byte[this.IvSize]; - Buffer.BlockCopy(temp, 0, this.Context.ClientWriteIV, 0, this.IvSize); - - md5.Initialize(); - temp = md5.ComputeHash(this.Context.RandomSC, 0, this.Context.RandomSC.Length); - this.Context.ServerWriteIV = new byte[this.IvSize]; - Buffer.BlockCopy(temp, 0, this.Context.ServerWriteIV, 0, this.IvSize); - } - else - { - this.Context.ClientWriteIV = CipherSuite.EmptyArray; - this.Context.ServerWriteIV = CipherSuite.EmptyArray; - } + this.Context.ClientWriteIV = CipherSuite.EmptyArray; + this.Context.ServerWriteIV = CipherSuite.EmptyArray; } DebugHelper.WriteLine(">>>> KeyBlock", keyBlock.ToArray()); diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs index d0d0721a12..5567d5857e 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs @@ -588,14 +588,20 @@ namespace Mono.Security.Protocol.Tls } catch (TlsException ex) { - // FIXME: should the send alert also be done asynchronously here and below? - this.protocol.SendAlert(ex.Alert); - negotiate.SetComplete (new IOException("The authentication or decryption has failed.", ex)); + try { + Exception e = ex; + this.protocol.SendAlert(ex.Alert != null ? ex.Alert : new Alert (AlertDescription.InternalError)); + } catch { + } + negotiate.SetComplete(new IOException("The authentication or decryption has failed.", ex)); } catch (Exception ex) { - this.protocol.SendAlert(AlertDescription.InternalError); - negotiate.SetComplete (new IOException("The authentication or decryption has failed.", ex)); + try { + this.protocol.SendAlert(AlertDescription.InternalError); + } catch { + } + negotiate.SetComplete(new IOException("The authentication or decryption has failed.", ex)); } } diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs index 6862c694a6..fb8ede4b90 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs @@ -233,16 +233,8 @@ namespace Mono.Security.Protocol.Tls // Send ServerCertificate message this.protocol.SendRecord(HandshakeType.Certificate); - // If the negotiated cipher is a KeyEx cipher send ServerKeyExchange - if (this.context.Negotiating.Cipher.IsExportable) - { - this.protocol.SendRecord(HandshakeType.ServerKeyExchange); - } - - // If the negotiated cipher is a KeyEx cipher or - // the client certificate is required send the CertificateRequest message - if (this.context.Negotiating.Cipher.IsExportable || - ((ServerContext)this.context).ClientCertificateRequired || + // If the client certificate is required send the CertificateRequest message + if (((ServerContext)this.context).ClientCertificateRequired || ((ServerContext)this.context).RequestClientCertificate) { this.protocol.SendRecord(HandshakeType.CertificateRequest); diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs index f4feb4e7de..2b261bf36a 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs @@ -123,45 +123,15 @@ namespace Mono.Security.Protocol.Tls this.Context.ClientWriteKey = keyBlock.ReadBytes(this.KeyMaterialSize); this.Context.ServerWriteKey = keyBlock.ReadBytes(this.KeyMaterialSize); - if (!this.IsExportable) + if (this.IvSize != 0) { - if (this.IvSize != 0) - { - this.Context.ClientWriteIV = keyBlock.ReadBytes(this.IvSize); - this.Context.ServerWriteIV = keyBlock.ReadBytes(this.IvSize); - } - else - { - this.Context.ClientWriteIV = CipherSuite.EmptyArray; - this.Context.ServerWriteIV = CipherSuite.EmptyArray; - } + this.Context.ClientWriteIV = keyBlock.ReadBytes(this.IvSize); + this.Context.ServerWriteIV = keyBlock.ReadBytes(this.IvSize); } else { - // Generate final write keys - byte[] finalClientWriteKey = PRF(this.Context.ClientWriteKey, "client write key", this.Context.RandomCS, this.ExpandedKeyMaterialSize); - byte[] finalServerWriteKey = PRF(this.Context.ServerWriteKey, "server write key", this.Context.RandomCS, this.ExpandedKeyMaterialSize); - - this.Context.ClientWriteKey = finalClientWriteKey; - this.Context.ServerWriteKey = finalServerWriteKey; - - if (this.IvSize > 0) - { - // Generate IV block - byte[] ivBlock = PRF(CipherSuite.EmptyArray, "IV block", this.Context.RandomCS, this.IvSize*2); - - // Generate IV keys - this.Context.ClientWriteIV = new byte[this.IvSize]; - Buffer.BlockCopy(ivBlock, 0, this.Context.ClientWriteIV, 0, this.Context.ClientWriteIV.Length); - - this.Context.ServerWriteIV = new byte[this.IvSize]; - Buffer.BlockCopy(ivBlock, this.IvSize, this.Context.ServerWriteIV, 0, this.Context.ServerWriteIV.Length); - } - else - { - this.Context.ClientWriteIV = CipherSuite.EmptyArray; - this.Context.ServerWriteIV = CipherSuite.EmptyArray; - } + this.Context.ClientWriteIV = CipherSuite.EmptyArray; + this.Context.ServerWriteIV = CipherSuite.EmptyArray; } DebugHelper.WriteLine(">>>> KeyBlock", keyBlock.ToArray()); diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs index 38415f05c5..4c259014d0 100644 --- a/mcs/class/System/System.Net/WebClient.cs +++ b/mcs/class/System/System.Net/WebClient.cs @@ -12,6 +12,7 @@ // Copyright 2003 Ximian, Inc. (http://www.ximian.com) // Copyright 2006, 2010 Novell, Inc. (http://www.novell.com) // Copyright 2012 Xamarin Inc. (http://www.xamarin.com) +// Copyright 2014 Microsoft Inc // // // Permission is hereby granted, free of charge, to any person obtaining @@ -553,6 +554,21 @@ namespace System.Net } } + // From the Microsoft reference source + string MapToDefaultMethod(Uri address) { + Uri uri; + if (!address.IsAbsoluteUri && baseAddress != null) { + uri = new Uri(baseAddress, address); + } else { + uri = address; + } + if (uri.Scheme.ToLower(System.Globalization.CultureInfo.InvariantCulture) == "ftp") { + return WebRequestMethods.Ftp.UploadFile; + } else { + return "POST"; + } + } + byte [] UploadFileCore (Uri address, string method, string fileName, object userToken) { string fileCType = Headers ["Content-Type"]; @@ -565,7 +581,10 @@ namespace System.Net fileCType = "application/octet-stream"; } - bool needs_boundary = (method != "PUT"); // only verified case so far + if (method == null) + method = MapToDefaultMethod (address); + + bool needs_boundary = (method != "PUT" && method != WebRequestMethods.Ftp.UploadFile); // only verified case so far string boundary = null; if (needs_boundary) { boundary = "------------" + DateTime.Now.Ticks.ToString ("x"); diff --git a/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs b/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs index 2fc05090ef..429a8d5945 100644 --- a/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs @@ -10,6 +10,7 @@ #if NET_2_0 using NUnit.Framework; using System; +using System.Collections.Generic; using System.IO; using System.Net; using System.Net.Sockets; @@ -23,6 +24,31 @@ namespace MonoTests.System.Net { FtpWebRequest defaultRequest; + private string _tempDirectory; + private string _tempFile; + + [SetUp] + public void SetUp () + { + _tempDirectory = Path.Combine (Path.GetTempPath (), "MonoTests.System.Net.FileWebRequestTest"); + _tempFile = Path.Combine (_tempDirectory, "FtpWebRequestTest.tmp"); + if (!Directory.Exists (_tempDirectory)) { + Directory.CreateDirectory (_tempDirectory); + } else { + // ensure no files are left over from previous runs + string [] files = Directory.GetFiles (_tempDirectory, "*"); + foreach (string file in files) + File.Delete (file); + } + } + + [TearDown] + public void TearDown () + { + if (Directory.Exists (_tempDirectory)) + Directory.Delete (_tempDirectory, true); + } + [TestFixtureSetUp] public void Init () { @@ -183,13 +209,15 @@ namespace MonoTests.System.Net ftp.KeepAlive = false; ftp.Timeout = 5000; ftp.Method = WebRequestMethods.Ftp.UploadFile; - ftp.ContentLength = 1; + ftp.ContentLength = 10; ftp.UseBinary = true; Stream stream = ftp.GetRequestStream (); - stream.WriteByte (0); + for (int i = 0; i < 10; i++) + stream.WriteByte ((byte)i); stream.Close (); FtpWebResponse response = (FtpWebResponse) ftp.GetResponse (); Assert.IsTrue ((int) response.StatusCode >= 200 && (int) response.StatusCode < 300, "UP#01"); + Assert.AreEqual (10, sp.result.Count, "UP#02"); response.Close (); } catch (Exception) { if (!String.IsNullOrEmpty (sp.Where)) @@ -200,6 +228,24 @@ namespace MonoTests.System.Net } } + [Test] + public void UploadFile_WebClient () + { + ServerPut sp = new ServerPut (); + File.WriteAllText (_tempFile, "0123456789"); + sp.Start (); + + using (WebClient m_WebClient = new WebClient()) + { + string uri = String.Format ("ftp://{0}:{1}/uploads/file.txt", sp.IPAddress, sp.Port); + + m_WebClient.UploadFile(uri, _tempFile); + } + Assert.AreEqual (10, sp.result.Count, "WebClient/Ftp#01"); + + sp.Stop (); + } + [Test] public void DownloadFile1 () { @@ -464,6 +510,8 @@ namespace MonoTests.System.Net } class ServerPut : FtpServer { + public List result = new List (); + protected override void Run () { Socket client = control.Accept (); @@ -511,8 +559,12 @@ namespace MonoTests.System.Net writer.Flush (); Socket data_cnc = data.Accept (); - byte [] dontcare = new byte [1]; - data_cnc.Receive (dontcare, 1, SocketFlags.None); + var datastr = new NetworkStream (data_cnc, false); + int ch; + while ((ch = datastr.ReadByte ()) != -1){ + result.Add ((byte)ch); + + } data_cnc.Close (); writer.WriteLine ("226 File received Ok"); writer.Flush (); diff --git a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id index d55c74b89a..ed7dfcf8bb 100644 --- a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -9ba190dcc3688e2a5c13d7497222758bd633e940 \ No newline at end of file +bb677a1b285adc8f63d91bb2490e7a11bd6d78ec \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id index c78f33d1ea..5fa0ed9912 100644 --- a/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -e4a2800a0dcd404b2c1b5b83674c10e1fbbfc422 \ No newline at end of file +46fe7a67471e0c277afe9e9843b2cd6fa7223d9e \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id index 900521a7dd..a8481f341b 100644 --- a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -8d3febc3bcc1a68179e2254527f999c81709567e \ No newline at end of file +aab470c977a75d50f8af904c5b6301c59dcaa9d9 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id index 65dc310376..1c134a7f91 100644 --- a/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id @@ -1 +1 @@ -de746eb848148a6d8d547c4fe4957549830f4100 \ No newline at end of file +f80a3e921d07f9ca6ddfd6a6c76778b94052f139 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id index 85e1bdff09..5abb148847 100644 --- a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -388c79223d2c9dfd31370959baa8e0732bf2c782 \ No newline at end of file +02cad6d9661f4105e52673659d24ddc3bf57c868 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.dll.REMOVED.git-id index 81f82b792f..49ad467c7c 100644 --- a/mcs/class/lib/monolite/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.dll.REMOVED.git-id @@ -1 +1 @@ -954b224e92c0ca40db3ed841324c99ac14419a15 \ No newline at end of file +6859fa37972a78123015546fb7abd102201ab436 \ No newline at end of file diff --git a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id index 04199ecf5b..8f5b271490 100644 --- a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id @@ -1 +1 @@ -7eb420e04eb9641a8be30dbe4ad33d7591466e00 \ No newline at end of file +d32723643e0a5a8ae25fa35ac6c829036082b6be \ No newline at end of file diff --git a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id index 511b2a6d04..e5f9ce8a9b 100644 --- a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -289dd62af9a9073a05a3d659b08b4bdb0fe1db4a \ No newline at end of file +f51ac490d60278d0e9f1a5258727bfd7492007ec \ No newline at end of file diff --git a/mono-core.spec b/mono-core.spec index 35ad888122..92876891ea 100644 --- a/mono-core.spec +++ b/mono-core.spec @@ -12,7 +12,7 @@ License: LGPL v2.1 only Group: Development/Languages/Mono Summary: A .NET Runtime Environment Url: http://www.mono-project.com -Version: 3.12.0 +Version: 3.12.1 Release: 0 Source0: mono-%{version}.tar.bz2 BuildRequires: bison diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index d43605ce62..7abebc1cb9 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -191,8 +191,6 @@ buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime-stat endif @echo "const char *build_date = \"`date`\";" > buildver-boehm.h mono_boehm-main.$(OBJEXT): buildver-boehm.h -main.c: buildver-boehm.h - endif if DISABLE_EXECUTABLES @@ -202,8 +200,7 @@ buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen-s endif @echo "const char *build_date = \"`date`\";" > buildver-sgen.h mono_sgen-main-sgen.$(OBJEXT): buildver-sgen.h -main-sgen.c: buildver-sgen.h - +main-sgen.$(OBJEXT): buildver-sgen.h if DTRACE_G_REQUIRED LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.$(OBJEXT) diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index d43605ce62..7abebc1cb9 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -191,8 +191,6 @@ buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime-stat endif @echo "const char *build_date = \"`date`\";" > buildver-boehm.h mono_boehm-main.$(OBJEXT): buildver-boehm.h -main.c: buildver-boehm.h - endif if DISABLE_EXECUTABLES @@ -202,8 +200,7 @@ buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen-s endif @echo "const char *build_date = \"`date`\";" > buildver-sgen.h mono_sgen-main-sgen.$(OBJEXT): buildver-sgen.h -main-sgen.c: buildver-sgen.h - +main-sgen.$(OBJEXT): buildver-sgen.h if DTRACE_G_REQUIRED LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.$(OBJEXT) diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index d685e341b2..2fa9af5392 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -4a25b5dd42ff9776e3727b7cacb27601db947e95 \ No newline at end of file +b6614235762bfb38ac43003a4babfb3bb6654de7 \ No newline at end of file diff --git a/mono/mini/cpu-arm64.md b/mono/mini/cpu-arm64.md index f45b72123a..bab00013c2 100644 --- a/mono/mini/cpu-arm64.md +++ b/mono/mini/cpu-arm64.md @@ -324,7 +324,7 @@ long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:36 vcall2: len:40 clob:c vcall2_reg: src1:i len:40 clob:c vcall2_membase: src1:b len:40 clob:c -dyn_call: src1:i src2:i len:120 clob:c +dyn_call: src1:i src2:i len:192 clob:c # This is different from the original JIT opcodes float_beq: len:32 diff --git a/mono/mini/generics.cs b/mono/mini/generics.cs index f350710c76..98b743b013 100644 --- a/mono/mini/generics.cs +++ b/mono/mini/generics.cs @@ -1119,6 +1119,27 @@ class Tests return 0; } } + + struct FooStruct2 { + public int a1, a2, a3; + } + + class MyClass where T: struct { + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public MyClass(int a1, int a2, int a3, int a4, int a5, int a6, Nullable a) { + } + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public static MyClass foo () { + Nullable a = new Nullable (); + return new MyClass (0, 0, 0, 0, 0, 0, a); + } + } + + public static int test_0_newobj_generic_context () { + MyClass.foo (); + return 0; + } } #if !MOBILE diff --git a/mono/mini/method-to-ir.c.REMOVED.git-id b/mono/mini/method-to-ir.c.REMOVED.git-id index 84b52db425..7694d19a0b 100644 --- a/mono/mini/method-to-ir.c.REMOVED.git-id +++ b/mono/mini/method-to-ir.c.REMOVED.git-id @@ -1 +1 @@ -783208d12240464610ce0690d42ee4beb31d48e0 \ No newline at end of file +47f1268a06d15b9838430eefa9f72e93ee34ad1d \ No newline at end of file diff --git a/mono/mini/mini.c.REMOVED.git-id b/mono/mini/mini.c.REMOVED.git-id index dd8042b235..c9e82fed40 100644 --- a/mono/mini/mini.c.REMOVED.git-id +++ b/mono/mini/mini.c.REMOVED.git-id @@ -1 +1 @@ -97f9bfa375eeac9d3590c30ff2fa078194efa4c7 \ No newline at end of file +d7ee5ba2671056ca7516f7bf4b3a62563cbfe8be \ No newline at end of file diff --git a/mono/mini/version.h b/mono/mini/version.h index a2e5cabcb2..de94ee1a45 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "(detached/a813491" +#define FULL_VERSION "mono-3.12.0-branch/4cb3f77" diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c index 09de17850e..1dc2615f90 100644 --- a/mono/utils/mono-proclib.c +++ b/mono/utils/mono-proclib.c @@ -20,6 +20,7 @@ #endif #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) +#include #include #include #include @@ -61,17 +62,19 @@ mono_process_list (int *size) struct kinfo_proc2 *processes = malloc (data_len); #else int mib [4]; - size_t data_len = sizeof (struct kinfo_proc) * 400; - struct kinfo_proc *processes = malloc (data_len); + size_t data_len = sizeof (struct kinfo_proc) * 16; + struct kinfo_proc *processes; + int limit = 8; #endif /* KERN_PROC2 */ void **buf = NULL; if (size) *size = 0; + +#ifdef KERN_PROC2 if (!processes) return NULL; -#ifdef KERN_PROC2 mib [0] = CTL_KERN; mib [1] = KERN_PROC2; mib [2] = KERN_PROC_ALL; @@ -80,19 +83,34 @@ mono_process_list (int *size) mib [5] = 400; /* XXX */ res = sysctl (mib, 6, processes, &data_len, NULL, 0); -#else - mib [0] = CTL_KERN; - mib [1] = KERN_PROC; - mib [2] = KERN_PROC_ALL; - mib [3] = 0; - - res = sysctl (mib, 4, processes, &data_len, NULL, 0); -#endif /* KERN_PROC2 */ - if (res < 0) { free (processes); return NULL; } +#else + processes = NULL; + while (limit) { + mib [0] = CTL_KERN; + mib [1] = KERN_PROC; + mib [2] = KERN_PROC_ALL; + mib [3] = 0; + + res = sysctl (mib, 4, NULL, &data_len, NULL, 0); + if (res) + return NULL; + processes = malloc (data_len); + res = sysctl (mib, 4, NULL, &data_len, NULL, 0); + if (res < 0) { + free (processes); + if (errno != ENOMEM) + return NULL; + limit --; + } else { + break; + } + } +#endif /* KERN_PROC2 */ + #ifdef KERN_PROC2 res = data_len/sizeof (struct kinfo_proc2); #else diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 5df9f21340..11b8f976e8 100644 Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ diff --git a/po/mcs/de.po b/po/mcs/de.po index 4432068a75..c665a96f00 100644 --- a/po/mcs/de.po +++ b/po/mcs/de.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2015-01-12 17:26+0000\n" +"POT-Creation-Date: 2015-03-06 17:50+0000\n" "PO-Revision-Date: 2008-09-26 15:14+0100\n" "Last-Translator: Daniel Nauck \n" "Language-Team: http://www.mono-project.de\n" diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index 9cd3f38f71..c5df41bb45 100644 Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index bd60c1bc8f..4887cbfbb5 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -ec0c928a96fed6ffc6899065f084b1f712755b7a \ No newline at end of file +ee51934e33fbdd630e92384759b50e42161be515 \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 82971a8745..22933d7fce 100644 Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index 333e62463a..8d4df1a80d 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -599d51ddc4936d374e21ae07a35117d56fb34385 \ No newline at end of file +3ae83862fcf62bdf967deb82ad23d2685a44a1a5 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index fb78e38d9f..44eefd1598 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 3.12.0\n" +"Project-Id-Version: mono 3.12.1\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2015-01-12 17:26+0000\n" +"POT-Creation-Date: 2015-03-06 17:50+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 6ba2cfd0b3..8bcb4eb1b2 100644 Binary files a/po/mcs/pt_BR.gmo and b/po/mcs/pt_BR.gmo differ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 3aad7ff16f..2717761794 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -3d10fb75162effca5e8993b9079b9c431722ec8d \ No newline at end of file +d01252b3d0a999a3008a7b89986b9d0f0d41a4ea \ No newline at end of file