Am Mittwoch, den 09.02.2005, 17:52 +0100 schrieb Joachim Lingner:
> With a working CLI UNO binding
> > +runtime environment, is it possible to rewrite climaker purely managed
> > (e.g. in C#)?
> Yes. You need however a bit of glue code. the mono cli_maker would be a 
> C# executable. At program start it needs to bootstrap UNO, because it 
> needs the type description provider server. This is achieved by calling 
> into a native (C++) library, where UNO is bootstrapped.

Isn't that what cli_cppuhelper.dll is for...?

> The C# function
> would return a  component context which can be further used to created 
> the needed UNO services. For example in MS C# you could have something like:
> 
> [DllImport("CLI_UNO_Bootstrap.DLL", EntryPoint="getContext",
> CallingConvention=CallingConvention.StdCall)]
> public extern XComponentContext getContext( );

...and this would have to be done in a reimplementation of
cli_cppuhelper (to replace native_bootstrap.cxx code)

> Seeing this I get first doubts, because you have a hen and egg problem 
> here. The UNO interfaces which you need to get the UNO type information 
> must be created first, for which the climaker is used :(
> 
> But you could use the mono runtime from a C++ program and use its C/C++ 
> interface to use the emit framework. But you have to clarify first if 
> such an interface exists at all. For MS there is only the cumbersume 
> Automation interface (IDispatch).
> 
> If we however assume that mono IL code is compatible to MS IL code and 
> the libraries have the same binary format (which could be but must not) 
> then one could use the windows climaker to create the types assembly and 
> just put the library into the Linux OO distribution.

The IL code should be the same, so one could take a Windows copy of
cli_types.dll for bootstrapping. Maybe there are some
compile-from-source zealots who will scream loudly, but I don't care.

> Well that is quite an undertaking. Do not underestimate the work. 

Heh. I know that climaker is not even the hard part.

> Anyway, good luck with that.

Thanks,

Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to