帮忙把这个DLL中公开函数改成C#类型的
函数原型:
int RTPC (int TPID,
char* AuthorizedCode,
char* RequestCode,
char* RequestParams,
char* ResponseCode,
int* ResponseBufLen,
char* ResponseParams); safecall;
改成C#类型
[解决办法]
private int RTPC(int TPID,string AuthorizedCode,string RequestCode,string RequestParams,string ResponseCode,ref int ResponseBufLen,string ResponseParams)
[解决办法]
char*输入的可以用string,输出的用StringBuilder
[解决办法]
这样定义也可以,免除了内存空间的分配:
public static extern int RTPC(int TPID, string AuthorizedCode, string RequestCode, string RequestParams, byte[] ResponseCode, ref int ResponseBufLen, byte[] ResponseParams) ;
[解决办法]