Hi Joachim, Thanks for the quick reply.
Am Mittwoch, den 09.02.2005, 14:53 +0100 schrieb Joachim Lingner: > > If I read the code correctly, a pure C# version of UNO-CLI is not > > possible, because the bridge has to have C linkage. > The binary UNO interface is defined in C. That means, that a CLI runtime > must be accessable through a C interface. For example, the Java bridge > uses the Java Native Interface. Okay, that is what I thought. > > If you'd rewrite UNO-CLI as portable as possible, where would you make > > the managed/native split? (I'm just trying to have you do my > > homework ;-) > The CLI-UNO bridge depends on the capability of the C++ compiler to > produced mixed code. That is, the library contains native code and > managed code. This cannot be simply devided. > > As far as I know, Mono does not provide such a C++ compiler. That is unfortunately correct. > So you need > to look for a way to make C code speak to CLI code and vice versa. If > you have sorted this out you should have a close look at the Java > bridge, to get an understanding of how the bridge works. Thanks for the pointer. I'll look at the Java bridge. > It is difficult to understand how the bridges work. So you could spend > quite some time over it. However, if you are serious the Java JNI bridge > is a good starting point. I was surprised to find quite a bit of documentation for bridges and even bridge writing in the Developer's Guide and on udk.openoffice.org. I'm working through that. > You must also take into account that you need to provide the UNO types > as CLI types. We have a tool called climaker which does this (project > cli_ure). climaker is also written in managed C++ code and uses > extensively the System.Reflection.Emit classes. It is used to create > assemblies containing all the UNO interfaces, Enums, etc. climaker uses the C++ UNO binding to use UNO reflection, read the registry files, etc, is this correct? With a working CLI UNO binding +runtime environment, is it possible to rewrite climaker purely managed (e.g. in C#)? Regards, Martin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
