Boost logo

Boost Users :

Subject: Re: [Boost-users] Adding C++/CLI code to my project makes app crash on startup
From: Leon Mlakar (leon_at_[hidden])
Date: 2017-12-13 00:48:10


On 13.12.2017 01:38, Gavin Lambert via Boost-users wrote:
> On 13/12/2017 02:52, Michael Powell wrote:
>>> I have a native (unmanaged) C++ application that consumes a C# SDK
>>> using a
>>> C++/CLI wrapper. This is achieved using a wrapper similar to the one
>>> described here:
>>> http://pragmateek.com/using-c-from-native-c-with-the-help-of-ccli-v2/
>>
>> You have the bridge entirely backwards. CLI does not bridge C# to C++.
>> Rather, it bridges C++ to CLI.
>
> It is true that the main intent of C++/CLI is to allow you to more
> easily call native code from a managed application, rather than the
> reverse.
>
> But the bridge can be used both ways, although there are some caveats
> related to AppDomains, decompilers, delegates, and garbage collection,
> which can surprise people.
It is indeed a bit tricky to get it right, but yes, it works both ways,

Cheers,
Leon


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net