以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]身份证读卡器连接 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=147895) |
||||
-- 作者:小老鼠 -- 发布时间:2020/3/26 17:59:00 -- [求助]身份证读卡器连接 这个身份证读卡器只找到一个C#的例子里面的程序可以连接读卡器读身份证
,不知道怎么转狐表代码,求指点 |
||||
-- 作者:小老鼠 -- 发布时间:2020/3/26 19:10:00 -- 有点蓝老师呢? |
||||
-- 作者:有点蓝 -- 发布时间:2020/3/27 9:09:00 -- 把HSCertInfo.dll、SSSE32.dll、UnPack.dll、HSCertInfo.lib复制到foxtable的安装目录里 全局代码 Public Declare Function ReadCertInfo Lib "HSCertInfo.dll" Alias "ReadCertInfo" (pBmpFile As String , pName As StringBuilder, pSex As StringBuilder, pNation As StringBuilder, pBirth As StringBuilder, pAddress As StringBuilder, pCertNo As StringBuilder, pDepartment As StringBuilder, pEffectData As StringBuilder, pExpire As StringBuilder, pErrMsg As StringBuilder) As Integer 调用 Dim pName As New StringBuilder(1024) Dim pSex As New StringBuilder(1024) Dim pNation As New StringBuilder(1024) Dim pBirth As New StringBuilder(1024) Dim pAddress As New StringBuilder(1024) Dim pCertNo As New StringBuilder(1024) Dim pDepartment As New StringBuilder(1024) Dim pEffectData As New StringBuilder(1024) Dim pExpire As New StringBuilder(1024) Dim pErrMsg As New StringBuilder(1024) Dim ret = CertInfoHelper.ReadCertInfo(ProjectPath & "temp.bmp", pName, pSex, pNation,pBirth,pAddress, pCertNo, pDepartment, pEffectData, pExpire, pErrMsg) If ret = 0 Then Output.Show("姓名.Text =" & pName.ToString()) Output.Show("性别.Text =" & pSex.ToString()) Output.Show("民族.Text =" & pNation.ToString()) Output.Show("出生日期.Text =" & pBirth.ToString()) Output.Show("家庭住址.Text =" & pAddress.ToString()) Output.Show("身份证号.Text =" & pCertNo.ToString()) Output.Show("发证机关.Text =" & pDepartment.ToString()) Output.Show("发证日期.Text =" & pEffectData.ToString()) Output.Show("有效日期.Text =" & pExpire.ToString()) Output.Show("图片路径=" & ProjectPath & "temp.bmp") Else MessageBox.Show(ret.ToString() + pErrMsg.ToString()) End If c#代码转换为vb.net:https://converter.telerik.com/ [此贴子已经被作者于2020/3/30 11:43:18编辑过]
|
||||
-- 作者:小老鼠 -- 发布时间:2020/3/30 10:58:00 -- 老师,调用代码,提示未知编译错误,帮忙看下,谢谢 此主题相关图片如下:qq截图20200330105255.jpg |
||||
-- 作者:有点蓝 -- 发布时间:2020/3/30 11:08:00 -- 把项目复制到其他目录,注意项目所在的路径,项目的名称不能有括号等特殊字符。然后重新打开项目测试,看提示什么错误? |
||||
-- 作者:小老鼠 -- 发布时间:2020/3/30 11:22:00 -- 路径换成去掉()之后,提示这个 此主题相关图片如下:qq截图20200330105255.jpg |
||||
-- 作者:有点蓝 -- 发布时间:2020/3/30 11:42:00 -- Dim pName As New StringBuilder(1024) Dim pSex As New StringBuilder(1024) Dim pNation As New StringBuilder(1024) Dim pBirth As New StringBuilder(1024) Dim pAddress As New StringBuilder(1024) Dim pCertNo As New StringBuilder(1024) Dim pDepartment As New StringBuilder(1024) Dim pEffectData As New StringBuilder(1024) Dim pExpire As New StringBuilder(1024) Dim pErrMsg As New StringBuilder(1024) Dim ret = CertInfoHelper.ReadCertInfo(ProjectPath & "temp.bmp", pName, pSex, pNation,pBirth,pAddress, pCertNo, pDepartment, pEffectData, pExpire, pErrMsg) If ret = 0 Then Output.Show("姓名.Text =" & pName.ToString()) Output.Show("性别.Text =" & pSex.ToString()) Output.Show("民族.Text =" & pNation.ToString()) Output.Show("出生日期.Text =" & pBirth.ToString()) Output.Show("家庭住址.Text =" & pAddress.ToString()) Output.Show("身份证号.Text =" & pCertNo.ToString()) Output.Show("发证机关.Text =" & pDepartment.ToString()) Output.Show("发证日期.Text =" & pEffectData.ToString()) Output.Show("有效日期.Text =" & pExpire.ToString()) Output.Show("图片路径=" & ProjectPath & "temp.bmp") Else MessageBox.Show(ret.ToString() + pErrMsg.ToString()) End If
[此贴子已经被作者于2020/3/30 11:42:59编辑过]
|
||||
-- 作者:小老鼠 -- 发布时间:2020/3/30 12:00:00 -- 还是不行么 此主题相关图片如下:qq截图20200330105255.jpg |
||||
-- 作者:有点蓝 -- 发布时间:2020/3/30 12:03:00 -- CertInfoHelper.ReadCertInfo 改为 ReadCertInfo
|
||||
-- 作者:小老鼠 -- 发布时间:2020/3/30 16:43:00 -- 可以了,多谢老师 |