[Mono-list] AppDomain
Lluis Sanchez
lluis@ideary.com
Mon, 24 Feb 2003 19:51:55 +0100
This should work:
mono_runtime_invoke (mono_object_get_virtual_method(sampleApplicationHost,
klass->vtable[i]), sampleApplicationHost, NULL, NULL);
Lluis
----- Original Message -----
From: "Daniel Lopez" <daniel@rawbyte.com>
To: <mono-list@ximian.com>
Sent: Monday, February 24, 2003 7:01 PM
Subject: [Mono-list] AppDomain
>
> Hi,
>
> I am looking for the correct way to call a method in a transparent proxy
> from the C side of mono. When I create an object in a different AppDomain
> and call it from C# everything is fine, but when I do it from C, it gets
> executed in the same domain.
> I attach some sample code to demonstrate what I mean.
>
> In c# the result of compiling and running test.exe:
> mcs test.cs /r:System.Web
> mono test.exe
>
> Main AppDomain: test.exe
> Process request AppDomain: 56ca2e66
>
> And compiling and running test.c
> mcs test.cs /r:System.Web /target:library
> cp test.dll /usr/lib (or somewhere where it will be picked up from the
path)
> gcc -o test test.c pkg-config --cflags --libs mono -lm
> ./test
>
> Main Domain: testing
> Process request AppDomain: testing
>
>
> So what is the correct way of invoking the method so it will be executed
in
> the other domain? I tried every method I could think of with no luck.
>
> Best regards
>
> DAniel
>