如果直接运行DLL工程,会显示You must select a host application to "run" a libary...
好在windows本身提供了一个完美的测试dll
点Add
main就是运行的主函数,注意主函数要用__declspec(dllexport),如下面这个代码
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
#define DLL _stdcall
#define DLL_EXPORT __declspec(dllexport)
DLL char* Add(char* A, char *B) {
int i = strlen(A), j = strlen(B);
int t = 0, l = max(i, j), k = l;
char *