[Mono-list] Questions on the Mono roadmap
Dallman, John
jgd@ugs.com
Tue, 18 Jan 2005 12:24:52 -0000
I'm starting work on interfacing some existing native
code libraries (which have versions for a wide variety
of platforms) to .NET code. Windows is the immediate
platform, but we'd like to have some idea of if/when
it will be possible to do the same on UNIX/Linux
platforms.
I've found that I need some specific .NET 2.0 features,
and would like to know if they're at all likely to make
it into Mono 1.2, or if I should expect to have to wait
until Mono 2.0, or forever. They are:
* Delegates with the attribute to specify that if they're
used to call native code, said code uses the C (cdecl)=20
calling convention, rather than the Pascal (stdcall)=20
calling convention that's the default for Microsoft C#.
The syntax goes thus:
[UnmanagedFunctionPointerAttribute( CallingConvention.Cdecl)]
public delegate int TEST_callback_f_t(int a, int b);
* Marshal.GetDelegateForFunctionPointer(), which creates a
delegate that wraps a pointer to a native code function.
* Managed C++ ;-) We will use this to create interfaces=20
to .NET code that can be called by native C code. There=20
doesn't seem to be an equivalent of C++ 'extern "C"' in=20
C#, so we haven't found a way to create C-callable=20
functions in C#. It seems very unlikely that we'd be=20
able to take a Managed C++ DLL from Windows onto a Mono
platform and link C code against it successfully, so we=20
need a way to build Managed C++ code on the Mono platform=20
- or some other language that can provide C-callable=20
interfaces and call C# code.
* Support for calling 64-bit native code, on 64-bit Linux,=20
Solaris, et al.=20
thanks!
--=20
John Dallman