[Mono-list] AppDomain

Gonzalo Paniagua Javier gonzalo@ximian.com
24 Feb 2003 19:28:26 +0100


El lun, 24 de 02 de 2003 a las 19:01, Daniel Lopez escribió:
> 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.

Hi Daniel!

Dunno if there's another way of doing what you want, but you can try
using AppDomain.DoCallBack. These would be the steps:

      * Create an instance of a CrossAppDomainDelegate in the
        application host domain.
      * Add a C function to the delegate. The C function does the invoke
        on the application host.
      * Invoke domain.DoCallBack with the delegate (domain is the
        default domain).
      * The C callback will be called from the appropiate
        thread/appdomain.

Good luck! ;-)

-Gonzalo