Calling C from C#

纵饮孤独 提交于 2019-12-06 13:42:58

You don't need a header file, but you will need to __declspec(dllexport) each function. And if it's C++ (i.e. a .cpp file) you'll need extern "C".

There's a handy program called depends.exe that allows you to look at a DLL and see what functions it exports and if it depends on any other DLLs. That might be why your DllImport is failing.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!