之前也联系过厂家的,他们不提供这个支持,他们只提供标准的api的接口,具体的还是要应用的自己开发,水平有限啊,,用vb打开过厂家样本的提供的工程里面,看到读卡调用的代码如下:
Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Integer, ByVal lpFileName As String, ByVal nSize As Integer) As Integer
Private Declare Function InitComm Lib "termb.dll" (ByVal X As Integer) As Integer
Private Declare Function CloseComm Lib "termb.dll" () As Integer
Private Declare Function Authenticate Lib "termb.dll" () As Integer
Private Declare Function Read_Content Lib "termb.dll" (ByVal Active As Integer) As Integer
Private Declare Function GetPeopleName Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetPeopleSex Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetPeopleNation Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetPeopleBirthday Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetPeopleAddress Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetPeopleIDCode Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetStartDate Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetEndDate Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Declare Function GetDepartment Lib "termb.dll" (ByVal lpBuffer As String, ByVal strLen As Integer) As Integer
Private Sub Command1_Click()
Dim str As String
Dim com As Integer
Dim szPath As String
Dim iRet As Integer
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Text1(3).Text = ""
Text1(4).Text = ""
Text1(5).Text = ""
Text1(6).Text = ""
Text1(7).Text = ""
Text1(8).Text = ""
Set Image1.Picture = Nothing
On Error Resume Next
iRet = InitComm(CInt(Text1(9).Text))
If Err Then
Err.Clear
MsgBox "端口错误", vbOKOnly, "提示"
Exit Sub
End If
If (iRet <> 1) Then
MsgBox "初始化设备失败", vbOKOnly, "提示"
Exit Sub
End If
iRet = Authenticate()
iRet = Read_Content(1)
If (iRet <> 1) Then
MsgBox "读卡失败", vbOKOnly, "提示"
Exit Sub
End If
str = Space$(256)
iRet = GetPeopleName(str, 256)
Text1(0).Text = Trim(str)
str = Space$(256)
iRet = GetPeopleSex(str, 256)
Text1(1).Text = Trim(str)
str = Space$(256)
iRet = GetPeopleNation(str, 256)
Text1(2).Text = Trim(str)
str = Space$(256)
iRet = GetPeopleBirthday(str, 256)
Text1(3).Text = Trim(str)
str = Space$(256)
iRet = GetPeopleAddress(str, 256)
Text1(4).Text = Trim(str)
str = Space$(256)
iRet = GetPeopleIDCode(str, 256)
Text1(5).Text = Trim(str)
str = Space$(256)
iRet = GetStartDate(str, 256)
Text1(6).Text = Trim(str)
str = Space$(256)
iRet = GetEndDate(str, 256)
Text1(7).Text = Trim(str)
str = Space$(256)
iRet = GetDepartment(str, 256)
Text1(8).Text = Trim(str)
szPath = App.Path + "\zp.bmp"
Image1.Picture = LoadPicture(szPath)
End Sub