智能卡读卡器命名 [英] Smartcard reader naming
问题描述
我在系统中有两个阅读器(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?
推荐答案
找到了解决方案序列号读取器
...
SCardConnect(hContext, readerName, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_UNDEFINED, ref hCard, ref protocol);
SCardGetAttrib(hCard, SCARD_ATTR_VENDOR_IFD_SERIAL_NO, receiveBuffer, ref receivebufferLen);
...
这篇关于智能卡读卡器命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!