c++ cli - How to push data from unmanaged to managed code? -


i using c++/cli wrapper access purely c++ library (-> unmanaged) c# framework (-> managed). want build in mechanism enables c++ library push information status towards framework. in understanding means have call @ least managed function unmanaged code @ point. possible , how can achieve this?

many help!

best regards, jakob

use delegate let unmanaged code call managed method. marshal::getfunctionpointerfordelegate() creates stub takes care of transition, calling instance method supported. can cast returned pointer function pointer usable unmanaged code.

you'll find full code sample in this answer.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -