自己水平不够解决不了,求大虾帮忙
使用身份证读卡器的DLL文件,编写 内部函数 时就提示未知编译错误
求解
全局代码部分
Public Declare Function Syn_GetCOMBaud Lib "Syn_IDCardRead.dll" (ByVal iComID As Integer, ByRef puiBaud As Byte) As Integer
Public Declare Function Syn_SetCOMBaud Lib "Syn_IDCardRead.dll" (ByVal iComID As Integer, ByVal uiCurrBaud As Integer, ByVal uiSetBaud As Integer) As Integer
Public Declare Function Syn_OpenPort Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer) As Integer
Public Declare Function Syn_ClosePort Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer) As Integer
Public Declare Function Syn_GetSAMStatus Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByVal iIfOpen As Integer) As Integer
Public Declare Function Syn_ResetSAM Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByVal iIfOpen As Integer) As Integer
Public Declare Function Syn_GetSAMID Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByRef pucSAMID As Byte, ByVal iIfOpen As Integer) As Integer
Public Declare Function Syn_GetSAMIDToStr Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByRef pcSAMID As Byte, ByVal iIfOpen As Integer) As Integer
Public Declare Function Syn_StartFindIDCard Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByRef pucManaInfo As Byte, ByVal iIfOpen As Integer) As Integer
Public Declare Function Syn_SelectIDCard Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByRef pucManaMsg As Byte, ByVal iIfOpen As Integer) As Integer
Public Declare Function Syn_ReadMsg Lib "Syn_IDCardRead.dll" (ByVal iPortID As Integer, ByVal iIfOpen As Integer, ByRef pIDCardData As Byte) As Integer
Public Declare Function Syn_SendSound Lib "Syn_IDCardRead.dll" (ByVal iCmdNo As Integer) As Integer
Public Declare Function Syn_DelPhotoFile Lib "Syn_IDCardRead.dll" ()
---------------------------------------------------------------------------
内部函数部分
Dim i, j As Integer
Dim sMsg As String
Dim ret As Integer
For j = 1001 To 1017
If Syn_OpenPort(j) = 0 Then
If Syn_GetSAMStatus(j, 0) = 0 Then
Vars("iPort") = j
Syn_ClosePort (j)
Vars("停止自动读取")=0
GoTo FIND
End If
Syn_ClosePort (j)
Else
Vars("停止自动读取")=1
End If
Next j
For i = 1 To 17
If Syn_OpenPort(i) = 0 Then
If Syn_GetSAMStatus(i, 0) = 0 Then
Vars("iPort") = i
Syn_ClosePort (i)
Vars("停止自动读取")=0
GoTo FIND
End If
Syn_ClosePort (i)
Else Vars("停止自动读取")=1
End If
Next i
FIND:
此主题相关图片如下:qq截图20130426094817.jpg
此主题相关图片如下:qq截图20130426094826.jpg
[此贴子已经被作者于2013-4-26 9:53:00编辑过]