Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2004-09-06 21:13:25 +0400
committerMiguel de Icaza <miguel@gnome.org>2004-09-06 21:13:25 +0400
commit639a8d383c2f186427a2524fa05f55fd53f6c886 (patch)
treed5fde4d636fc9780884fa055ae42e0b3a168e7f1 /docs
parent79f7c6804b925c2fb202be03ca372d121d4eeaf2 (diff)
Synchronized with the web/ version
svn path=/trunk/mono/; revision=33431
Diffstat (limited to 'docs')
-rw-r--r--docs/embedded-api15
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/embedded-api b/docs/embedded-api
index 1fd739ae2ba..76f45f8be73 100644
--- a/docs/embedded-api
+++ b/docs/embedded-api
@@ -69,7 +69,16 @@
not interfere with code in other domains. This is useful if
you want to host different applications in your program.
- Then you can load an assembly containing code into the domain:
+ Now, it is necessary to transfer control to Mono, and setup
+ the threading infrastructure, you do this like this:
+
+ void *user_data = NULL;
+
+ mono_runtime_exec_managed_code (domain, main_thread_handler, user_data);
+
+ Where your main_thread_handler can load your assembly and execute it:
+
+ static void main_thread_handler (gpointer user_data)
MonoAssembly *assembly;
@@ -112,6 +121,10 @@
layer, so in each file where you use pthread.h you should
include the <gc/gc.h> file.
+ If you can not do this for any reasons, just remember that you
+ can not store pointers to Mono Objects on the stack, you can
+ store them safely in the heap, or in global variables though
+
* Exposing C code to the CIL universe
The Mono runtime provides two mechanisms to expose C code to