易語言呼叫c++dll
阿新 • • 發佈:2019-01-28
int _stdcall jie(const char * str, char * str1,char * str2)
{string a =str;
int len=a.size();
strcpy(str1,a.data());
strcpy(str2,a.c_str());
MessageBoxA(0,a.c_str(),"s",MB_OK);
return a.size();
}
//*.h宣告檔案,易語言呼叫無堆那個錯誤
#ifdef __cplusplus
#define EXPORT extern "C" __declspec (dllexport)
#else
#define EXPORT __declspec (dllexport)
#endif
//這裡宣告函式
EXPORT int _stdcall sh(char str[]);
EXPORT int _stdcall jie(const char * str,char * str1, char * str2);
#ifdef UNICODE
//這裡宣告UNICODE型別的函式
//#define EdrCenterText EdrCenterTextW
#else
//這裡宣告ASSIC型別的函式
//#define EdrCenterText EdrCenterTextA
#endif