[Mono-dev] PInvoke and language interopelability

Alfredo José Muela Romero alfredoj.muela at gmail.com
Tue Jan 13 11:37:09 EST 2009

2009/1/13 Bill Holmes <billholmes54 at gmail.com>

> 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

Hi Bill,

Yes, your right that's my problem in the simplest words. Sorry not to have
explained it so easily :)

I guess I'm in your second case, since the extern method (the one in the C++
library) can't be redefined to receive a function pointer instead of a
object pointer.

Where could I find some examples / info about the solution you talked about?

What do you think about the tunned proxy class to get it done with
delegates? With that approach I would get more software architectures in the
scope, wouldn't I?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090113/e056a6fe/attachment.html 

More information about the Mono-devel-list mailing list