标签:
什么是dll:
1 #ifdef MYLIBAPI 2 #else 3 #define MYLIBAPI extern "C" __desclspec(dllimport) 4 #endif 5 6 MYLIBAPI int g_nResult; 7 8 MYLIBAPI int Add(int nLeft,int nRight)
1 #include <windows.h> 2 3 #define MYLIBAPI extern "C" __declspec(dllexport) 4 #include "mylib.h" 5 int g_nResult; 6 7 int Add(int nLeft,int nRight) 8 { 9 g_nResult = nLeft + nRight; 10 return g_nResult; 11 }
标签:
原文地址:http://www.cnblogs.com/zsq1993/p/5965607.html