生成的dll库代码
// GoDll.cpp : 定义 DLL 应用程序的导出函数。
//
#include "stdafx.h"
#include <iostream>
#include <cstdint>
void __stdcall void_R0()
{
std::cout << __FUNCTION__ << std::endl;
}
void __stdcall void_R1(const char* name)
{
std::cout << __FUNCTION__ << " ----> " << name << std::endl;
}
void __stdcall void_R2(const char*name ,char **outName)
{
std::string _name = "HintSoft 新浩艺-";
_name += name;
strcpy(*outName,_name.c_str());
}
uint8_t __stdcall uint8_R1(char** outJson)
{
*outJson = new char[256];
memset(*outJson,0,256);
strcpy(*outJson,"Hello -> 你被骗了,这里没有Json,只有中文");
return 1;
}
void __stdcall uint8_R1_free(char** outJson)
{
if(outJson == 0) return;
if(*outJson == 0) return;
delete [](*outJson);
*outJson = nullptr;
}
typedef void (*CallBackFunType)(const char * in);
void set