[Mono-devel-list] Embedding C# in C, domains

Mikkel Kruse Johnsen mikkel at linet.dk
Wed Feb 4 10:15:02 EST 2004


Hi All

Im working on embedding C# in my C program. What I wanna do is being
able to load a Bonobo Object into my C program by having the activated
shlib embed C#, parsing the pointer to the BonoboObject on to C#, which
wraps Bonobo, just like Gtk# wraps Gtk+, setting the pointer to the
"IntPtr Raw".

I can then access the pointer with this.Handle (this.Raw). All of this
is working, but the problem is domains, Im a bit confused about domain.

I now create one domain (mono_jit_init) and I can load a lot of bonobo
objects, but when closing one of them, the others don't work.

---

1: Should I create a new domain for each Bonobo Object I create ?

2: Should I create one global domain, with "mono_jit_init" ?

2.1: The def. is mono_jit_init (const gchar *filename), is it the
filename or is it the name of the domain.

3: Is there one global domain, and then you create sub domain, with
"mono_domain_create", my program fails when domain
mono_domain_assembly_open using a domain created like this.

4: What is "mono_runtime_init", "mono_runtime_cleanup",
"mono_runtime_quit", etc.

---

If someone could just explain a little about the ideas behind domains, I
you be so happy, or point me to some doc (that google hasn't picked up
yet :)

/Mikkel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040204/b4653f8b/attachment.bin 


More information about the Mono-devel-list mailing list