这两天一直在解决这个问题,我已经可以读了,但写进去有问题,已经有一个读写器不知怎的,现在不能用啦!望高手出手
解决方案 »
- vb 动态生成tooltiptext的问题
- Combo1 .ListIndex =格式问题 达人来 送分
- 定时器问题提问!
- 谁能帮我提高折断代码的效率!谢谢!先给20,不够再加,多少都可以!
- win98下如何实现信使服务?
- regsvr32的问题
- 求救!!实时错误“480”,不能创建AUTOREDRAW图象,如何解决?把PICTUREBOX定义太大会产生这个错误,不能绘图!
- VB2005连接SQL2005数据库问题
- VB和DELPHI的比较
- 请问在什么地方能找到制作chm文件的软件?请E_mail给我[email protected] .谢谢!!!
- 求救 为每一列字段设编码。
- 小马哥请进!关于isnull()函数
声明方法:
函数:Declare Function 函数名 LIB “动态库文件名(含路径)” (调用参数列表) AS 返回值类型
过程:Declare Sub 过程名 LIB “动态库文件名(含路径)” (调用参数列表)
调用参数中:属于值传送的,前面加 ByVal;属于指针型的,用 As Any。表示。函数声明
Private Declare Function LinkDevice Lib " hxdxq32.dll" (ByVal devicename As String) As Integer
Private Declare Function UnlinkDevice Lib " hxdxq32.dll" () As Integer
Private Declare Function PowerOn Lib " hxdxq32.dll" (ByVal slot As Byte, ByRef recedata As Any, ByRef plen As Long) As Integer
Private Declare Function PowerOff Lib " hxdxq32.dll" (ByVal slot As Byte, ByRef recedata As Any, ByRef plen As Long) As Integer
Private Declare Function ReadCard Lib "hxdxq32.dll" (ByVal zone&, ByVal addr&, ByVal rlen&, ByRef recedata As Any, ByRef plen As Long) As Integer
Private Declare Function WriteCard Lib "hxdxq32.dll" (ByVal zone&, ByVal addr&, ByVal rlen&, ByRef senddata As Any, ByRef recedata As Any, ByRef plen As Long) As Integer
Private Declare Function ChkSecret Lib "hxdxq32.dll" (ByVal keytype As Byte, ByRef key As Any, recedata As Any, ByRef plen As Long) As Integer
Private Declare Function ByteToHexStr Lib "hxdxq32.dll" (ByRef senddata As Any, ByVal size&, ByVal recedata As String) As Integer
Private Declare Function HexStrToByte Lib "hxdxq32.dll" (ByRef senddata As Any, ByRef recedata As Any) As Integer调用例子
Private Sub Command1_Click()
Dim strbuf As String * 256
Dim key(16) As Byte
Dim senddata(256) As Byte
Dim recedata(256) As Byte
Dim i, ErrorCode As Integer
Dim plen As Long
Dim tt As Long
strbuf = String(256, Chr(0))
key(0) = &HFF
key(1) = &HFF
For i = 0 To 255
senddata(i) = i
Next
plen = 0
ErrorCode = LinkDevice(“COM1”)
ErrorCode = PowerOn(1, recedata(0), plen)
ErrorCode = ByteToHexStr(recedata(0), 3, strbuf)
'按压缩方式读
ErrorCode = ReadCard(0, 32, 32, recedata(0), plen)
ErrCode = ByteToHexStr(recedata(0), plen, strbuf)
ErrorCode = ChkSecret(0, key(0), recedata(0), plen)
'按压缩方式写
ErrCode = ByteToHexStr(recedata(0), plen, strbuf)
ErrorCode = WriteCard(0, 32, 32, senddata(0), recedata(0), plen)
ErrCode = ByteToHexStr(recedata(0), plen, strbuf)
ErrorCode = PowerOff(1, recedata(0), plen)
ErrorCode = UnlinkDevice
End Sub
有接口例子,上面就是
TO:809982
我们公司拿钱购买的,你说为什么不应该提出来,可上面的例子根本解决不了问题
我不知道你说的合法用户是什么意思