最近的项目中用到读卡器,用的华视身份证阅读器,附上SDK使用手册

<script type="text/javascript">// </script> <script type="text/javascript" src="http://cbjs.baidu.com/js/o.js"></script>
最近的项目中用到读卡器,用的华视身份证阅读器,附上SDK使用手册
1.定义
应用函数开发包含下列文件:

termb.dll      API函数的动态联接库
sdtapi.dll     内部动态库
cvrapi.dll      内部动态库
wltrs.dll       内部动态库
termb.lic      身份证相片解压授权文件,放于C:\目录下

2.       函数列表

下面这5个为主要的API

int CVR_InitComm(int Port)                            初始化连接;
int CVR_Authenticate()                                  卡认证;
int CVR_Read_Content(int Active)                   读卡操作;
int CVR_CloseComm()                                   关闭连接;
int CVR_Ant(int mode)                                   射频操作,仅串口有效

下面的为可选API,主要为二次开发使用

int  CVR_ReadBaseMsg (unsigned char *pucCHMsg, unsigned int *puiCHMsgLen,unsigned char *pucPHMsg, unsigned int *puiPHMsgLen,int nMode)                                                                    读卡操作(读入内存)
int  GetPeopleName(char *strTmp, int *strLen)            得到姓名信息
int  GetPeopleSex(char *strTmp, int *strLen)               得到性别信息  
int  GetPeopleNation(char *strTmp, int *strLen)           得到民族信息   
int  GetPeopleBirthday(char *strTmp, int *strLen)        得到出生日期   
int  GetPeopleAddress(char *strTmp, int *strLen)        得到地址信息   
int  GetPeopleIDCode(char *strTmp, int *strLen)         得到身份证号信息
int  GetDepartment(char *strTmp, int *strLen)            得到发证机关信息
int  GetStartDate(char *strTmp, int *strLen)               得到有效开始日期     
int  GetEndDate(char *strTmp, int *strLen)                 得到有效截止日期

3.部份代码

         ///   <summary>
        
///  初始化设备
        
///   </summary>
        
///   <param name="port"></param>
        
///   <returns></returns>
        [DllImport( " termb.dll ", CharSet = CharSet.Auto)]
         private  static  extern  int CVR_InitComm( int port);

         ///   <summary>
        
///  关闭设备
        
///   </summary>
        
///   <returns></returns>
        [DllImport( " termb.dll ", CharSet = CharSet.Auto)]
         private  static  extern  int CVR_CloseComm();

         ///   <summary>
        
///  卡与身份证认证
        
///   </summary>
        
///   <returns></returns>
        [DllImport( " termb.dll ", CharSet = CharSet.Auto)]
         private  static  extern  int CVR_Authenticate();

         ///   <summary>
        
///  读取内容
        
///   </summary>
        
///   <param name="active"></param>
        
///   <returns></returns>
        [DllImport( " termb.dll ", CharSet = CharSet.Auto)]
         private  static  extern  int CVR_Read_Content( int active);
<script type="text/javascript">= "551284";</script> <script type="text/javascript" src="http://cbjs.baidu.com/js/o.js"></script>
<script type="text/javascript">= "551289";</script> <script type="text/javascript" src="http://cbjs.baidu.com/js/o.js"></script>

<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值