0

how to pass a callback function from the c# code into a function in C++ CLR ? If I add a parameter to the callback function once it becomes invisible to my code in c#

//c++ clr
typedef int (__stdcall * Callback)(int*, int,int);

bool Init() //<-- OK
{
}

bool Init(Callback cb)//<-- Init is not visible to my code in c#
{

}

I plan to call this callback from another thread. I have experience with callback for unmanaged DLL , but for the CLR does not understand how to do.

Charles
  • 50,943
  • 13
  • 104
  • 142
Mixer
  • 1,292
  • 3
  • 22
  • 41

0 Answers0