How do I pass the address of a c++ method in win32 app to a c# method with Action delegate parameter method

Deadly 提交于 2019-11-29 13:03:52

If it's a native C++ function, use Marshal.GetDelegateForFunctionPointer

If you're using C++/CLI, which it sounds like (and you should retag the question), you want something along the lines of:

NetSocket(gcnew Action<int,int,String^>(this, &ServerClass::ActionMethod))
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!