特急!谁会在pb中调用dll链接库,明天交活

在pb调用出现色serial open failed错误,为什么?

怎样调用这个dll,小弟明天交活

本动态连接库共提供3个接口函数具体说明如下:

1、 初始化函数:
long RFInit(int PortNo)
其中PortNo为串口号,取值为1或2;函数返回一长整型数据为串口句柄以备读卡及关闭串口函数使用,若初始化不成功,返回NULL

2、 读卡函数:
int RFRead(long Handle,unsigned char *DatBuf)
其中Handle为前述初始化函数返回的串口句柄,DatBuf为接收数据缓冲区指针,若函数调用成功,返回的卡号即放在DatBuf指定的缓冲区中,并且函数返回值为1,若失败,则函数返回值为NULL

3 关闭串口:串口使用完毕后应关闭,使用下述函数:
int RFExit(long Handle)
其中Handle为上述串口句柄。函数返回值:成功:1,失败:NULL

[510 byte] By [qs_25-射白鹿] at [2007-12-14]
# 1
function long RFInit(int PortNo) library "your.dll"
function int RFRead(long Handle,Ref String DatBuf) library "your.dll"
function int RFExit(long Handle) library "your.dll"
jaguarcts-xzh2000 at 2007-10-26 > top of Msdn China Tech,PowerBuilder,基础类...
# 2
要先定义外部函数
yuanbo824-小波在线 at 2007-10-26 > top of Msdn China Tech,PowerBuilder,基础类...
# 3
外部函数是要先声明的, 然后才能用, 这还要看你那DLL是用啥写的?如是PB写的,除非你有源代码, 否则就不行
xiongxiao-小雄 at 2007-10-26 > top of Msdn China Tech,PowerBuilder,基础类...