Howto implement callback interface from unmanaged DLL to .net app?

前端 未结 4 1831
终归单人心
终归单人心 2020-11-27 04:54

in my next project I want to implement a GUI for already existing code in C++. My plan is to wrap the C++ part in a DLL and to implement the GUI in C#. My problem is that I

4条回答
  •  野性不改
    2020-11-27 05:27

    See Marshal.GetFunctionPointerForDelegate, which will give you a function pointer for calling managed (i.e. C# code) from unmanaged code.

提交回复
热议问题