PB中声明、调用tuxedo方法

声明例子:

Function Integer tpinit (Long TPINFO ) LIBRARY "wtuxws32.dll"

Function Integer tpterm () LIBRARY "wtuxws32.dll"

Function Integer tpcall (String SVCNAME , Long IDATA , Long ILEN, ref Long

ODATA ,ref Long OLEN , Long flags ) LIBRARY "wtuxws32.dll"

Function Integer tpacall (String SVCNAME , Long IDATA , Long

ILEN , Long flags ) LIBRARY "wtuxws32.dll"

Function Long tpalloc (String BUFTYPE , String SUBTYPE , Long

BUFSIZE ) LIBRARY "wtuxws32.dll"

Function Long tprealloc (Long buffer , Long BUFSIZE ) LIBRARY

"wtuxws32.dll"

Subroutine tpfree (Long buffer ) LIBRARY "wtuxws32.dll"

Function integer gettperrno() library "wtuxws32.dll"

Function integer getFerror() library "wtuxws32.dll"

Function Integer Fchg32( Long RCVBUF,long FLDID,long OCC,ref String value,ref

long LEN ) LIBRARY "wtuxws32.dll"

Function integer Fget32( Long RCVBUF,long FLDID,long OCC,ref String value,ref

long LEN) library"wtuxws32.dll"

Function integer Foccur32( Long fbfr,long FLDID) library"wtuxws32.dll"

程序中调用tuxedo 例子:

tpinfo=tpalloc("TPINIT","",240)

tpalloc (String BUFTYPE , String SUBTYPE , Long BUFSIZE )

ret = tpinit(0)

if ret<0 then

   ret=gettperrno( )

   messagebox('信息提示','tpinit error')

else

   reqbuf = tpalloc("FML32", "", 65535)

Fchg32(reqbuf,iv_gh_code,0,gv_gh,gh_len)//Fchg32( Long RCVBUF,long

FLDID,long OCC,ref String value,ref long LEN )

Fchg32(reqbuf,iv_fhy_code,0,gv_gh,fh_len)

Fchg32(reqbuf,iv_tx_code,0,gv_tx,gv_tx_len)

ret= tpcall("ADP_MILK",reqbuf,my_len,reqbuf,my_len,0)

if (ret<0) then

   ret=gettperrno( )

   retstr="tpcall:"+ tpstrerror(ret)

   messagebox('信息提示',retstr)

else

   my_len=0

   Fget32(reqbuf,iv_zhye_code,0,ls_zhye,my_len)

   Fget32(reqbuf,iv_cwbm_code,0,is_error_code,my_len)

end if

   tpfree(reqbuf)

ret=tpterm()

end if

end if

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值