Public Declare Function CT_ReadCard Lib "CENT_MsgReader.dll" (ByVal nPort As Long, ByRef BpNo As Byte, ByVal nTimeOut As Long, ByVal nMode As Long, ByVal nDelimiter As Long, ByVal nTr2DataLen As Long, ByRef szTr2Data As Byte, ByVal nTr3DataLen As Long, ByRef szTr3Data As Byte) As LongDim Port As Long, nTimeOut As Long, Mode As Long, Delimiter As Long, Tr2DataLen As Long, Tr3DataLen As Long Dim Tr2Data(256) As Byte Dim Tr3Data(256) As Bytertn = CT_ReadCard(Port, vbNull, nTimeOut, Mode, Delimiter, Tr2DataLen, Tr2Data(0), Tr3DataLen, Tr3Data(0))
int CT_ReadCard( int nPort, char* BpNo, int nTimeOut, int nMode, int nDelimiter, int nTr2DataLen, char *szTr2Data, int nTr3DataLen, char *szTr3Data ); 2.1.1参数 参数 说明 nPort 0-hid设备,>0串口号 BpNo 转口,NULL-无转口,其他为对应转口 nTimeOut 超时时间,单位秒 nMode 2-读2磁道,3-读3磁道,23-读23磁道 nDelimiter 字符集格式,0-ISO格式,1-IBM格式 nTr2DataLen szTr2Data长度 szTr2Data 二磁道数据 nTr3DataLen szTr3Data长度 szTr3Data 三磁道数据非常抱歉,发帖的时候粗心了,以上是读卡函数的说明,非常感谢各位的回答,4L的方法我试了一下,还是报DLL调用约定错误,不知道怎么回事,希望大神能耐心解答,谢谢
int __stdcall CT_WriteCard( int nPort, char* BpNo, int nTimeOut, int nMode, int nDelimiter, char *szTr2Data, char *szTr3Data )
这个没太大的“参考价值”呀。另外一个比较重要的问题,在 C++ 中的 int类型,在 VB6中要用Long才能跟它匹配!
Public Declare Function CT_ReadCard Lib "CENT_MsgReader.dll" (ByVal nPort As Long, ByRef BpNo As Byte, ByVal nTimeOut As Long, ByVal nMode As Long, ByVal nDelimiter As Long, ByVal nTr2DataLen As Long, ByRef szTr2Data As Byte, ByVal nTr3DataLen As Long, ByRef szTr3Data As Byte) As LongDim Port As Long, nTimeOut As Long, Mode As Long, Delimiter As Long, Tr2DataLen As Long, Tr3DataLen As Long
Dim Tr2Data(256) As Byte
Dim Tr3Data(256) As Bytertn = CT_ReadCard(Port, vbNull, nTimeOut, Mode, Delimiter, Tr2DataLen, Tr2Data(0), Tr3DataLen, Tr3Data(0))
char* BpNo,
int nTimeOut,
int nMode,
int nDelimiter,
int nTr2DataLen,
char *szTr2Data,
int nTr3DataLen,
char *szTr3Data );
2.1.1参数
参数 说明
nPort 0-hid设备,>0串口号
BpNo 转口,NULL-无转口,其他为对应转口
nTimeOut 超时时间,单位秒
nMode 2-读2磁道,3-读3磁道,23-读23磁道
nDelimiter 字符集格式,0-ISO格式,1-IBM格式
nTr2DataLen szTr2Data长度
szTr2Data 二磁道数据
nTr3DataLen szTr3Data长度
szTr3Data 三磁道数据非常抱歉,发帖的时候粗心了,以上是读卡函数的说明,非常感谢各位的回答,4L的方法我试了一下,还是报DLL调用约定错误,不知道怎么回事,希望大神能耐心解答,谢谢