[Mono-list] PInvoke Conventions

Miguel de Icaza miguel@ximian.com
28 Jul 2001 16:16:48 -0400


> The trick is coming up with a *standard* way of doing
> this black magic.  I fear that if the "C wrapper" crowd
> wins this war, then the resulting C# library will only work
> with Mono's VM and the rest of us will have to start
> from scratch.

I have to disagree with the conclussion Rhys.

The C-wrapper is designed to generate PInvoke methods, but the wrapper
makes sure that the complexity of the type size and offset is handled
outside the VM.

So this configuration process happens at same time you configure your
platform-dependant assemblies.

We are not advocating the use of internalcalls to solve the problem.
We will be using PInvoke, but wont be using any extra magic to label
the PInvoke methods: instead we will put the magic on a support shared
library (which we need anyways).

miguel.