智能卡读卡器命名

编程入门 行业动态 更新时间:2024-10-28 03:22:20
本文介绍了智能卡读卡器命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在系统中有两个阅读器(HID OMNIKEY 5321)(每个阅读器执行不同的功能)

I have two readers (HID OMNIKEY 5321) in system (every reader performs a different function)

  • 阅读器1-智能卡阅读器 0 "
  • 阅读器2-智能卡阅读器 1 "
  • reader 1 - "Smart Card Reader 0"
  • reader 2 - "Smart Card Reader 1"

在我的程序中设置了

  • 智能卡读卡器 0 "-操作1
  • 智能卡读卡器 1 "-操作2
  • "Smart Card Reader 0" - action 1
  • "Smart Card Reader 1" - action 2

但有时(不重新启动,可能失去联系)

but sometimes (without rebooting, perhaps lost contact)

  • 读取器1的名称为智能卡读取器 1 "
  • 阅读器2的名称为智能卡阅读器 0 "
  • reader 1 gets name "Smart Card Reader 1"
  • reader 2 gets name "Smart Card Reader 0"

,并且该程序无法执行用户所需的操作. 我在WinScard.dll中使用SCardGetStatusChange(需要读取器的名称)

and the program does not do what users need. I use SCardGetStatusChange (requires the name of the reader) in WinScard.dll

该怎么办? 有没有办法更改阅读器的名称(固件,驱动程序...)? 可以使用阅读器的序列号吗?

What to do? Is there a way to change the name of the reader (firmware, drivers...)? Is it possible to use the serial number of the reader?

我也看过了,但是没有结果 智能卡读卡器命名:删除时任何读者,其余的名字都会改变 如何构造PCSC智能卡读卡器的友好名称"? a>

I also looked, but no result Smartcard reader naming: when removing any reader, the name of the rest changes How are PCSC smart card reader 'friendly names' constructed?

推荐答案

找到了解决方案使用WinSCard获取PCSC读取器序列号

序列号读取器

... SCardConnect(hContext, readerName, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_UNDEFINED, ref hCard, ref protocol); SCardGetAttrib(hCard, SCARD_ATTR_VENDOR_IFD_SERIAL_NO, receiveBuffer, ref receivebufferLen); ...

更多推荐

智能卡读卡器命名

本文发布于:2023-05-27 23:12:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/306144.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:词库加载错误:Could not find file 'D:\淘小白 高铁采集器win10\Configuration\Dict_Sto

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!