c++/cli pass (managed) delegate to unmanaged code
Yes, you want Marshal::GetFunctionPointerForDelegate(). Your code snippet is missing the managed function you’d want to call, I just made one up. You will also have to declare the managed delegate type and create an instance of it before you can get a function pointer. This worked well: #include “stdafx.h” using namespace System; using namespace System::Runtime::InteropServices; … Read more