[Mono-dev] P/Invoking a VS2012 C++ DLL, DLL behavior is materially different in 3.2.3 than in 3.1 and .net

Ian Norton inorton at gmail.com
Fri Sep 27 18:59:14 UTC 2013


Er.. How are you calling this? Surely the function name gets mangled?
On 27 Sep 2013 09:01, "Dennis Fantoni" <dennis at fantoni.dk> wrote:

>   (running on windows 7)
>
> In short, if I wrote this in a dll in .net or mono 3.1  i would get to
> “this shows”
>
> void tester() {
> try {
> throw(foo);
> cerr<<”this never shows”
> }
> ctch(...){
> cerr<<”this shows”
> }
> }
>
> However, in 3.2.3 above code when called via Pinvoke, will display “this
> never shows” , indicating that the data structures used by the exception
> system inside the DLL has been damaged by mono.
>
> I have created two VS2012 sample solutions to create a C# dll caller, and
> a C++ callee that exposes the problem – and filed a bug
>
> https://bugzilla.xamarin.com/show_bug.cgi?id=14989
>
> If someone have the time to confirm or comment, I would be very pleased.
> If I am not mistaken it is a pretty severe bug – it might happen that any
> vs2012 c++ DLL that uses exceptions internally has ceased to work with mono
> on windows. (the problem might be bigger, I havent tried to build dll’s
> with VS2010 or other languages).
>
> Anyways, I would expect mono to behave similar to .net, but it does not in
> this respect.
>
> Regards,
>
>
> Dennis
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20130927/b0779e84/attachment.html>


More information about the Mono-devel-list mailing list