Tips for using a C library from C#

前端 未结 6 2200
你的背包
你的背包 2020-12-28 21:57

I\'ve got a library in C which I\'d like to use from C#.

From what I\'ve gleaned off the internet, one idea is to wrap it in a C++ dll, and DllImport that.

6条回答
  •  时光取名叫无心
    2020-12-28 22:30

    Microsoft documentation for Marshal.GetFunctionPointerForDelegate here:

    "Converts a delegate into a function pointer that is callable from unmanaged code."

提交回复
热议问题