[Mono-dev] PInvoke and language interopelability
Alfredo José Muela Romero
alfredoj.muela at gmail.com
Tue Jan 13 13:14:55 EST 2009
2009/1/13 Bill Holmes <billholmes54 at gmail.com>
> I have attached a sample. It needs work and I need to write it up and
> share it on the web. One day I will get around to it.
I'd like to see that website someday :)
> If I have done this correctly you should just have to un tar it and run
I will give you some feedback as soon as I check it.
> > I guess I'm in your second case, since the extern method (the one in the
> > library) can't be redefined to receive a function pointer instead of a
> > object pointer.
> This restriction concerns me. If you cannot change the parameter to
> accept a function pointer I doubt that you will able to change it to
> accept a IUnknown derived interface pointer.
Definitely I can't change the signature of the method, which receives a
class pointer (kind of "A* arg"). Therefore, I can inherit from A and do the
workaround with the delegate / function pointer.
> > 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
> > scope, wouldn't I?
> This is probably the best approach for you. This approach sounds like
> the way we encapsulate QT at my company. It can be a mess to C# and
> C++ wrappers in sync but it does work well.
I think I'm going to start to head this way.
Thanks for the help :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list