[Mono-list] (no subject)

Nindi Singh nindi73 at yahoo.co.uk
Tue Nov 20 19:57:29 EST 2007



>Nindi Singh wrote:
>> I am looking for some help with embedding Mono. I have a C++ App and
>> would like to facilitate .NET plug-ins . This is the reverse to what
>> is normally seen, C++ called from C#. I want to call C# functions
>> from C++ with the C++ runtime being in control. As I understand there
>> are two options, PInvoke or directly using the Mono API. I have
>> played with both of these methods. My problem however is to do with
>> exception propagation. I have read in the Mono docs that it is not
>> possible to propagate .NET exceptions to C++.  I would like to know
>> if there is any way around this. Is it for example possible to make a
>> custom patch for Mono to be able to do this ?

>This doesn't apply if you embed the runtime. Exceptions will
>be returned in the last argument passed to the mono_runtime_invoke
>function.

>Robert


What if I call a C# function (B)  from a C++ function (A) and then this C# function in turn calls another C++ function (C) which throws ? For me this C++ exception seems to get stuck in the Mono runtime instead of being propagated to the original C++ function (A)


A (C++) calls  B(C#) which calls  C (C++) which throws.
 

N

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list





      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.html


More information about the Mono-list mailing list