摘要: 1、VS2003新建DLL项目dllTest2、项目dllTest中添加脚本point.h,代码如下: 1 #ifndef POINT_H 2 #define POINT_H 3 4 #ifdef DLL_FILE 5 class _declspec(dllexport) point //导出类point 6 #else 7 class _declspec(dllimport) point //导入类point 8 #endif 9 {10 public:11 float y;12 float x;13 point();14 point(float x_c... 阅读全文
posted @ 2013-10-28 15:53 Faint@LastStep 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 1、VS2003新建DLL项目dllTest2、项目dllTest中添加脚本lib.h,代码如下: 1 #ifndef LIB_H 2 #define LIB_H 3 extern int dllGlobalVar; 4 extern "C" int GetGlobalVar(); 5 extern "C" void SetGlobalVar(int value); 6 //为了验证全局的字符变量定义导出dllGlobalStr 7 extern char *dllGlobalStr; 8 extern "C" char *GetGl 阅读全文
posted @ 2013-10-28 10:03 Faint@LastStep 阅读(360) 评论(0) 推荐(0) 编辑