I am exposing some ISO C++ data types to .Net (mono on Linux to be precise).
For the purpose of brevity, I shall refer to C# in my question, although my question relates to all of the .Net languages (with C# and VB.Net being my target languages).
So far, I have worked out how to expose the ISO C++ data types in C# class(es) for use in mono - thanks to some of the clever guys here on SO.
The only problem so far is how to deal with the C++ callbacks. In .Net languages (C# and Vb.Net), I believe 'delegates' are the callback equivalent.
Sticking with C# for now, can anyone recommend a way that I can register the C# delegate functions with my ISO C++ code.
The ISO C++ code is a notification library, and I want to be able to "push" the notifications to the mono framework (i.e. C# delegates in this case).
My underlying assumption is that the mechanism/steps to implement this would be the same for the .Net languages - I'll just have to code the actual delegates in the .Net language of choice - is that assumption correct?
Last but not the least, is the question of thread saftey. The underlying ISO C++ code that I am exposing to .Net (mono to be more specific), is both re-ntrant and thread safe - do I have to do anything "extra" to call .Net delegate from my ISO C++ code?