[Mono-devel-list] ORBit2 binding

David Voit david.voit at weihenstephan.org
Sat May 15 09:35:31 EDT 2004

Thanks for you fast answer.

Am Mo, den 10.05.2004 schrieb Jonathan Pryor um 13:46:
> No.  DllImport can only be applied to method declarations.
> (Furthermore, Windows PE object format doesn't support exporting
> variables.  Anything that looks like an exported variable, such as
> ``__declspec(dllexport) int my_variable;'' is actually wrapped by a pair
> of functions to get and set the variables value.)

Thats bad. Ok than I need glue code.

> From the looks of things, you shouldn't need to write code like that. 
> In the code you provided, the only place that construct is used is in
> get_string(), which is only called to provide an argument to
> ORBit_c_stub_invoke().
> Since all _args *really* is is a ``char**'' variable, you could just let
> the runtime handle this with it's built-in marshaller:

I really need a pointer array.
Example Interface:

interface Echo {
        void echoString(in string input, in long ntimes);

This gets mapped to:

Echo_echoString(Echo _obj, const CORBA_char * input, const CORBA_long
		CORBA_Environment * ev)
   gpointer _args[2];

   _args[0] = (gpointer) & input;
   _args[1] = (gpointer) & ntimes;

(from echo-stub.c)

And my code still doesn't work I think it is a problem in the struct
mapping. Maybe a ORBit and P/Invoke god can help me ;)

Thanks for your help

More information about the Mono-devel-list mailing list