2013年9月10日

VS2012 C# 调用 C dll

摘要: 建一个解决方案,包含3个工程:WIN32 DLL 、控制台应用(c)、控制台应用(c#)WIN32 DLL代码:#ifdef __cpluscplus#define EXPORT extern "C" __declspec(dllexport)#else#define EXPORT __declspec(dllexport)#endifEXPORT int add(int x, int y){ return (x + y);}控制台应用(c):#include #include typedef int (*func)(int x, int y);int main(int a 阅读全文

posted @ 2013-09-10 23:10 JonnyLulu 阅读(944) 评论(0) 推荐(0)

导航