C++代码:
extern "C" _declspec ( dllexport )
int GAME2JSONAPI interfaceRank2Json(const char* strData, char* outBuf, int outSize,ERankType ranktype)
{
MsBase64 base64 = strData;
int bufSize = base64.DecodeLength();
BYTE* buf = (BYTE*)EvMemAlloc(bufSize);
bufSize = base64.Decode(buf);
int ret = rank2json(buf, bufSize, outBuf, outSize,ranktype);
EvMemFree(buf);
return ret;
}
int interfaceRank2Json(const char* strData, char* outBuf, int outSize,ERankType ranktype);
C#这边应该怎么调用??谁能写个Demo看看?
[DllImport("user2xml.dll", EntryPoint = "interfaceRank2Json", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern int interfaceRank2Json(string userData, ref string outBuf, ref int outSize, ERankType ranktype);
这样有问题吗???
交互式爱情
繁星点点滴滴
相关分类