Skip to Content
0
Former Member
Jan 20, 2011 at 01:11 AM

调用RfcCallReceive成功,返回参数没有回来

87 Views

用c++开发rfc的接口,

1、我用的是连接串(TRACE=1 CLIENT=%s USER=%s PASSWD=%s ASHOST=%s SYSNR=0),连接成功。

2、输入参数是两个int数据,输出参数是一个int,我定义了:RFC_PARAMETER exporting[2], importing[3];

importing[0].name = "NUMC1";

importing[0].nlen = 5;

importing[0].type = TYPINT;

importing[0].leng = sizeof(RFC_INT);

importing[0].addr = &nNum1;

importing[1].name = "NUMC2";

importing[1].nlen = 5;

importing[1].type = TYPINT;

importing[1].leng = sizeof(RFC_INT);

importing[1].addr = &nNum2;

//SAP_CHAR cOut[6];

exporting[0].name = "NUMC3";

exporting[0].nlen = 5;

exporting[0].type = TYPINT;

exporting[0].leng = sizeof(RFC_INT);

exporting[0].addr = &nOut;

3、调用RfcCallReceive

rfc_rc = RfcCallReceive (rfc_handle, function,

exporting, importing,

tables, &exception);

这个成功,但nOut没有返回回来,还是我的初始值。

麻烦哪位大虾解答。