#ifdef FUN_EXPORTS
#define FUN_API extern "C" __declspec(dllexport)
#else
#define FUN_API extern "C" __declspec(dllimport)
#endif
FUN_API int sum(int a, int b)
{
return a + b
}
FUN_API int sub(int a, int b)
{
return a - b
}
FUN_API int savedata(char* p, int l)
{
return printf("savedata: %d, %s\n", l, p)
}
FUN_API char* retstring(char* p)
{
printf("retstring: %s\n", p)
return p
}
static int counter = 0
FUN_API int count()
{
return ++counter
}
FUN_API int count2()
{
counter += 2
return counter
}
FUN_API void setcount(int c)
{
counter = c
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)