一个简单的能被C#调用的C++的dll

来源:互联网 发布:js div内容居中显示 编辑:程序博客网 时间:2024/05/12 02:09

#include <iostream>

#include <windows.h>

using namespace std;

 

#ifdef __cplusplus         // if used by C++ code

extern "C" {                  // we need to export the C interface

#endif

 

__declspec(dllexport) void output()

{

    MessageBox(NULL, "hello world", "hello", 0);

}

 

#ifdef __cplusplus

}

#endif

原创粉丝点击