I have a static C library where I have non static call back function. The Client program that register this callback gets Video data from camera .
Now I am writing Wrapper(DLL) for this in C++/CLI.This Wrapper Dll will be used in C# application.
How to Implement the callback in C++/CLI so that C# code can register it and gets the video data from it.
In C++/CLI, you can have static functions (with native C signature, which can work as a callback from a C library), calling managed delegates:
So register
MyCallbackat your C library, register your C# delegate toMyDispatcherClass::MyDelegateand you are done.