• 非托管类,身份证接口调用


    1.装人口信息系统接口软件

    2.程序-人口信息系统接口软件- 右键delphitest 属性 -寻找目标 -开发包-termb.dll、WltRS.dll 考到开发文件debug里

    3代码如下:

    using System.Runtime.InteropServices;
    using System.Text;

     [DllImport("termb.dll", EntryPoint = "InitComm")]
            static extern int InitComm(int Port);
            [DllImport("termb.dll", EntryPoint = "CloseComm")]
            static extern int CloseComm();
            [DllImport("termb.dll", EntryPoint = "Read_Content")]
            static extern int Read_Content(int Active);
            [DllImport("termb.dll", EntryPoint = "GetPeopleName")]
            static extern int GetPeopleName(StringBuilder strbl, int strLen);
            [DllImport("termb.dll", EntryPoint = "Authenticate")]
            static extern int Authenticate();

      private void button1_Click(object sender, EventArgs e)
            {
                int li_ret = 0;
                int li_port = 1001;

                li_ret = InitComm(li_port);
                int at = Authenticate();
                Read_Content(1);
                StringBuilder strbl = new StringBuilder();
                int strLen = 30;
                GetPeopleName(strbl, strLen);

                int cl = CloseComm();
            }

  • 相关阅读:
    springdata jpa
    springboot添加事务
    hibernate缓存
    idea下的hibernate反向生成插件
    hibernate级联查询映射的两种方式
    Spring Hibernate JPA 联表查询 复杂查询
    thymeleaf模板引擎
    java替换富文本标签等
    mac最新系统安装beego出现kiil 9
    xshell配置
  • 原文地址:https://www.cnblogs.com/lgxll/p/2805043.html
Copyright © 2020-2023  润新知