显然,他是api的,不需要引用,只需定义函数即可。
在全局代码中加入:
Public Declare Function et_FindToken Lib "FT_ET99_API.dll" (ByVal et99pid As String, ByRef et99count As Short) As Integer
Public Declare Function et_OpenToken Lib "FT_ET99_API.dll" (ByRef et99handle As Integer, ByVal et99pid As String, ByVal et99index As Short) As Integer
Public Declare Function et_CloseToken Lib "FT_ET99_API.dll" (ByVal et99handle As Integer) As Integer
Public Declare Function et_Write Lib "FT_ET99_API.dll" (ByVal et99handle As Integer, ByVal et99offset As Short, ByVal et99len As Short, ByRef et99write As Byte) As Integer
Public Declare Function et_Read Lib "FT_ET99_API.dll" (ByVal et99handle As Integer, ByVal et99offset As Short, ByVal et99len As Short, ByRef et99read As Byte) As Integer
Public Declare Function et_Verify Lib "FT_ET99_API.dll" (ByVal et99handle As Integer, ByVal et99flag As Short, ByVal et99pin As String) As Integer
Public Declare Function et_GetSN Lib "FT_ET99_API.dll" (ByVal et99handle As Integer, ByRef et99sn As Byte) As Integer
Public Declare Function et_HMAC_MD5 Lib "FT_ET99_API.dll" (ByVal et99handle As Integer, ByVal et99keyID As Integer, ByVal et99textLen As Short, ByRef et99pucText As Byte, ByRef et99pucDigest As Byte) As Integer
Public Declare Function MD5_HMAC Lib "FT_ET99_API.dll" (ByRef et99pucText As Byte, ByVal et99textLen As Integer, ByRef et99pucKey As Byte, ByVal et99keyLen As Integer, ByRef et99tokenKey As Byte, ByRef et99pucDigest As Byte) As Integer
Public Declare Function et_SetKey Lib "FT_ET99_API.dll" (ByVal et99handle As Integer, ByVal et99keyID As Integer, ByRef et99write As Byte) As Integer
Public Sub HexToString(ByRef ByteArray() As Byte, ByRef str_Renamed As String, ByRef lSize As Integer)
Dim b As Byte
Dim i As Integer
For i = lSize - 1 To 0 Step -1
b = ByteArray(i) \ 16
If b > 9 Then
str_Renamed = str_Renamed & Chr(b + Asc("A") - 10)
Else
str_Renamed = str_Renamed & Chr(b + Asc("0"))
End If
b = ByteArray(i) Mod 16
If b > 9 Then
str_Renamed = str_Renamed & Chr(b + Asc("A") - 10)
Else
str_Renamed = str_Renamed & Chr(b + Asc("0"))
End If
Next i
End Sub
[此贴子已经被作者于2011-10-24 16:54:43编辑过]