C++创建动态库

【C++】创建动态库

有很多方法,这个只是其中一种 比较简洁的方法。


char* __stdcall correction(char* str)

char *_result = new char[search_word.length() + 1];
strcpy_s(_result,search_word.length() +1, search_word.c_str());
return _result;


typedef char* (__stdcall *fncorrection)(char* line);


HINSTANCE hdll;
hdll = LoadLibrary("D:\vs_project1\check\Debug\check.dll");
fncorrection myFun1;
myFun1 = (fncorrection)GetProcAddress(hdll, "correction");

原文地址:https://www.cnblogs.com/zwczp/p/9718582.html