以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  【求助】使用身份证读卡器的DLL文件,提示未知编译错误  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=32126)

--  作者:goodhi
--  发布时间:2013/4/26 9:52:00
--  【求助】使用身份证读卡器的DLL文件,提示未知编译错误

自己水平不够解决不了,求大虾帮忙

 

使用身份证读卡器的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:

 

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:dll.rar


图片点击可在新窗口打开查看此主题相关图片如下:qq截图20130426094817.jpg
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20130426094826.jpg
图片点击可在新窗口打开查看
[此贴子已经被作者于2013-4-26 9:53:00编辑过]

--  作者:goodhi
--  发布时间:2013/4/26 10:39:00
--  
求解
--  作者:goodhi
--  发布时间:2013/4/26 11:34:00
--  

求助


--  作者:goodhi
--  发布时间:2013/4/26 17:00:00
--  
不能沉啊