[Mono-list] PInvoke Conventions

Bob Salita bsalita@hotmail.com
Wed, 18 Jul 2001 19:51:13 -0500


>The "libffi" library is quite nice.  It takes care of all the nasty
>business of converting abstract descriptions of call information
>into the specifics used by the underlying CPU, OS, and compiler.

I'd like to challenge your preference for libffi, so here goes. I'm unsure 
if I understand the functionality of libffi correctly, apologies in advance.

1. Doesn't every struct have to be defined in advance?
2. Doesn't every call have to be defined in advance?
3. Does it handle bit field endiness (left-to-right vs. right-to-left) which 
may differ between .Net and the C compiler.
4. Is it a problem if the C compiler used to build mono handles structs 
differently than the C compiler used to build the lib?
5. Does it handle struct members that are assigned offsets in a 
non-ascending order (perhaps reversed)?
6. If definitions are required (1 and 2 above), then is it any better than 
using class wrappers?

Bob.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com