* SqlConnection.cs: Use null as default value for connectionString
[mono.git] / web / embedded-api
index 42a45431f7b1af062d9b79df65b5765bc69e05a1..3b405c98ddd191575e917267cc3f469c39528146 100755 (executable)
        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:
 
        <pre>
+               void *user_data = NULL;
+
+               mono_runtime_exec_managed_code (domain, main_thread_handler, user_data);
+       </pre>
+
+       Where your main_thread_handler can load your assembly and execute it:
+
+       <pre>
+       static void main_thread_handler (gpointer user_data)
+       {       
                MonoAssembly *assembly;
 
                assembly = mono_domain_assembly_open (domain, "file.dll");
        layer, so in each file where you use pthread.h you should
        include the &lt;gc/gc.h&gt; 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