On 10/17/07 Tony Djordjevski wrote:
> > You do need to write C code as the API is a C API. I didn't list in the
> > last mail because the C implementation of these functions is not a
> > difference between the C# impl and the C++ impl of the rest of the code.
> > The dllimport declarations I mentioned above would pinvoke to these C
> > functions.
> 
> Those C functions you speak about will need to execute managed code.
> 
> So, either way, what needs to be done is to allow "Reverse P/Invoke" or 
> some form of DllExport.  Assuming this project is successful, native 
> C/C++ will have to, at some point, execute managed code.
> 
> There are only two ways that I know of that you can accomplish this in .NET:
> 1. C++ Interop
> 2. Modifying a compiled assembly

or 3, the easiest of all: using function pointers in the C code which
the runtimes will generate automatically when passing a delegate
to a p/invoked method.
Besides being trivial compared to both 1 and 2, it works on Mono and it
works on the MS CLR.
Happy hacking!

lupus

-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]                                     debian/rules
[EMAIL PROTECTED]                             Monkeys do it better
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to