[Mono-dev] PInvoke and language interopelability

Bill Holmes billholmes54 at gmail.com
Tue Jan 13 11:04:24 EST 2009


Alfredo,

I may not fully understand the problem.  Are you simply asking how to
call back into C# from C++?

We use 2 different approaches.

Function pointers.  If you pass a C# delegate through the PInvoke
layer C++ will view that as a function pointer.

COM Interop.  (Only supported on Windows and Linux.) This allows you
to marshal a Managed object to C++ which then can call methods on that
objects' interface(s).

-bill


More information about the Mono-devel-list mailing list