第三代身份证读卡器专业应用服务商,定制身份证阅读器模组模块,系统开发自助终端集成

东信EST-100GS谷歌版身份证读卡器

二代证阅读器模块动态库及文档使用说明

来源:www.idukaqi.com   标签:使用说明 模块 动态库 文档   发布时间: 2015-11-12 9:26:23

名称:二代证阅读器模块动态库及文档使用说明

版本:sdtapi.dll、sdtapi.h、sdtapi.lib、WltRS.dll、WltRS.h、WltRS.lib、二代证基本信息数据说明.doc、二代证系统终端API使用手册.doc、相片解码函数使用说明.doc等等

开发包大小:187KB

下载地址:

二代证阅读器模块动态库及文档使用说明

专业提供二代证阅读器模块动态库及文档使用说明,模块动态库及文档使用说明相关技术支持由 www.idukaqi.com免费提供。

procedure TForm3.SpeedButton1Click(Sender: TObject);

begin

   timer1.Enabled:=true;

end;

procedure TForm3.SpeedButton3Click(Sender: TObject);

begin

   timer1.Enabled:=false;

   // delete by Ethan.Zhang on 060412

   {

   label1.caption:='';

   label2.caption:='';

   label3.caption:='';

   label4.caption:='';

   label5.caption:='';

   label6.caption:='';

   label7.caption:='';

   label8.caption:='';

   label9.caption:='';

   image2.Visible:=false;

   statusbar1.Panels.Items[0].Text:='请放置您的身份证!......';

   }

   close;

end;

procedure TForm3.FormCreate(Sender: TObject);

begin

   FilePath:=ExtractFilePath(Application.ExeName);

   timer1.enabled:=false;

   if Timer1.enabled=false then

   begin

   label1.caption:='';

   label2.caption:='';

   label3.caption:='';

   label4.caption:='';

   label5.caption:='';

   label6.caption:='';

   label7.caption:='';

   label8.caption:='';

   label9.caption:='';

   end;

   // add by Ethan.Zhang on 060413

   SpeedButton1.Click;

   // add end

end;

procedure TForm3.Timer1Timer(Sender: TObject);

var

  i:integer;

  fn, fPath, tmp: String;

  buf: array[0..255] of WideChar;

begin

//用户进行了相应的端口选择

  if portflag<>-1 then

  begin

       //找卡

        result:=SDT_StartFindIDCard(portflag,@pucIIN,1);

        if result<>159 then

        begin

         //statusbar1.panels[0].text:='请您重新放卡';

         result:=SDT_ClosePort(portflag);

         result:=SDT_OpenPort(portflag);

         end;

        if timer1.Enabled=false then

        begin

        exit;

        end;

//选卡

        result:=SDT_SelectIDCard(portflag,@pucSN,1);

//读取卡中的信息,并在应用程序目录中生成文件

        result:=SDT_ReadBaseMsg(portflag,@pucCHMsg,@puiCHMsgLen,@pucPHMsg,@puiPHMsgLen,1);

        if result=144 then

        begin

        statusbar1.Panels[0].text:='读取卡片基本信息成功!......';

        end

        else

        begin

        label1.caption:='';

        label2.caption:='';

        label3.caption:='';

        label4.caption:='';

        label5.caption:='';

        label6.caption:='';

        label7.caption:='';

        label8.caption:='';

        label9.caption:='';

        image2.Visible:=false;

        statusbar1.Panels[0].text:='请重新放置您的身份证!';

        exit;

        end;

        FileAddress:=filepath+'baseinfo.txt';

        FileHandle:=FileCreate(FileAddress);

        FileWrite(FileHandle,pucCHMsg,puiCHMsgLen);

        FileClose(FileHandle);

        if timer1.Enabled=false then

        begin

        exit;

        end;

        //写入基本信息到文本文件中,并进行显示

        FileAddress:=filepath+'baseinfo.txt';

      with TMemoryStream.Create do

      begin

        fPath := ExtractFilePath( Application.ExeName );

        fn := fPath + 'baseinfo.txt';

        LoadFromFile( fn );

        // 姓名

        FillChar(buf, Length(buf), 0);

        ReadBuffer(buf, 30);

        label1.caption:= buf;

       // 性别

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 2);

       if buf[0] = '1' then

       label2.caption  := '男'

       else

       label2.caption  := '女';

       // 民族

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 4);

       case strtoint(buf) of

         1: Label3.Caption:='汉';

         2: Label3.Caption:='蒙古';

         3: Label3.Caption:='回';

         4: Label3.Caption:='藏';

         5: Label3.Caption:='维吾尔';

         6: Label3.Caption:='苗';

         7: Label3.Caption:='彝';

         8: Label3.Caption:='壮';

         9: Label3.Caption:='布依';

         10: Label3.Caption:='朝鲜';

         11: Label3.Caption:='满';

         12: Label3.Caption:='侗';

         13: Label3.Caption:='瑶';

         14: Label3.Caption:='白';

         15: Label3.Caption:='土家';

         16: Label3.Caption:='哈尼';

         17: Label3.Caption:='哈萨克';

         18: Label3.Caption:='傣';

         19: Label3.Caption:='黎';

         20: Label3.Caption:='傈僳';

         21: Label3.Caption:='佤';

         22: Label3.Caption:='畲';

         23: Label3.Caption:='高山';

         24: Label3.Caption:='拉祜';

         25: Label3.Caption:='水';

         26: Label3.Caption:='东乡';

         27: Label3.Caption:='纳西';

         28: Label3.Caption:='景颇';

         29: Label3.Caption:='柯尔克孜';

         30: Label3.Caption:='土';

         31: Label3.Caption:='达斡尔';

         32: Label3.Caption:='仫佬';

         33: Label3.Caption:='羌';

         34: Label3.Caption:='布朗';

         35: Label3.Caption:='撒拉';

         36: Label3.Caption:='毛南';

         37: Label3.Caption:='仡佬';

         38: Label3.Caption:='锡伯';

         39: Label3.Caption:='阿昌';

         40: Label3.Caption:='普米';

         41: Label3.Caption:='塔吉克';

         42: Label3.Caption:='怒';

         43: Label3.Caption:='乌孜别克';

         44: Label3.Caption:='俄罗斯';

         45: Label3.Caption:='鄂温克';

         46: Label3.Caption:='德昂';

         47: Label3.Caption:='保安';

         48: Label3.Caption:='裕固';

         49: Label3.Caption:='京';

         50: Label3.Caption:='塔塔尔';

         51: Label3.Caption:='独龙';

         52: Label3.Caption:='鄂伦春';

         53: Label3.Caption:='赫哲';

         54: Label3.Caption:='门巴';

         55: Label3.Caption:='珞巴';

         56: Label3.Caption:='基诺';

         end;

       // 出生

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 16);

       label4.caption  := buf;

       Label4.Caption:=copy(buf,1,4)+' 年 '+copy(buf,5,2)+' 月 '+copy(buf,7,2)+' 日' ;

       csstr:=copy(buf,1,4)+'-'+copy(buf,5,2)+'-'+copy(buf,7,2);

       // 住址

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 70);

       label5.caption := buf;

       // 身份证号码

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 36);

       label6.caption := buf;

       // 签发机关

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 30);

       label7.caption := buf;

       // 起始日期

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 16);

       startstr:=copy(buf,1,4)+'-'+copy(buf,5,2)+'-'+copy(buf,7,2);

      // Edit9.Text := buf;

       // 截止日期

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, 16);

       Label8.Caption:=copy(buf,1,4)+' 年 '+copy(buf,5,2)+' 月 '+copy(buf,7,2)+' 日 '+' 到 '+copy(buf,1,4)+' 年 '+copy(buf,5,2)+' 月 '+copy(buf,7,2)+' 日';

       endstr:=copy(buf,1,4)+'-'+copy(buf,5,2)+'-'+copy(buf,7,2);

       // 最新住址

       FillChar(buf, Length(buf), 0);

       ReadBuffer(buf, Size - 220);

       label9.caption := buf;

       //显示照片

      fileaddress:=filepath+'pic.wlt';

      filehandle:=filecreate(fileaddress);

      filewrite(filehandle,pucPHMsg,puiPHMsgLen);

      fileclose(filehandle);

      if (portflag>0) and (portflag<11) then

      result:=GetBmp(fileaddress,1)

      else

      begin

      result:=GetBmp(fileaddress,2);   //USB端口类型

      end;

      image2.Visible:=true;

      if result=1 then

      image2.picture.loadfromfile(FilePath+'pic.bmp')

      else

      begin

      statusbar1.panels[0].text:='调用照片函数失败!';

      exit;

      end;

       Free;

    end;

    //关闭串口

    result:=SDT_ClosePort(portflag);

    if result<>144 then

    begin

    showmessage('关闭串口失败!');

    exit;

    end;

    //保存到数据库

    saveresult(Form3);

   end

   else

//用户没有进行相应的端口选择

      begin

        statusbar1.panels[0].text:='请进行相应的通信端口选择';

      end;

end;

 

 
QQ在线咨询
客户服务热线
15017507838
15017501838