[Mono-list] late linking & dynamic invocation ...

Paolo Molaro lupus@ximian.com
Sun, 30 Jun 2002 18:33:20 +0200

On 06/27/02 Michael Meeks wrote:
> On Thu, 2002-06-27 at 00:42, A Rafael D Teixeira wrote:
> > Sure it looks a lot with what I'm cooking for mbas, because VB.NET has 
> > loose-binding options (I called it loose-binding instead of late-binding, 
> > purposefully...)
> 	Yes - precisely what I'm looking for; the ultra error prone, but
> strangely funky, super late linking type stuff ...

If you want ultra error-prone, you can use mono_runtime_invoke ()
directly from C code :-)

> 	It seems then that we have to compile stubs at least for CORBA
> implementations to work nicely.

I haven't looked into how remoting may fit into the picture, but I think
it would be good to have CORBA support tightly integrated into mono.
All this stuff should be able to reside in a separate module that can be
loaded by the runtime on demand and it could work basically the same way
the perl (and probably the python) binding to orbit works.
You always need the idl file or the interface repository: at this point
you can do two things:
*) use libidl and create a proxy class on the fly
*) the same, but the create an assembly on disk (so it can be cached)
Note that this 'compilation' doesn't need external tools and it can be
done on the fly (using System.Reflection.Emit).
The actual method invocation can happen in two ways:
*) using the remoting support (you get an array of object args that you
hand almost directly to the orbit_small marshaller)
*) custom marshaling (but this will require porting work to other

Activation is another issue, but that's quite easy to implement.


lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better