我的系统中有两个读卡器 (HID OMNIKEY 5321)(每个读卡器执行不同的功能)
- 读卡器 1 -“智能卡读卡器 0”
- 读卡器 2 - “智能卡读卡器 1”
在我的程序中设置了
- “智能卡读卡器0”- 操作 1
- “智能卡读卡器1”- 操作 2
但有时(无需重新启动,可能失去联系)
- 读卡器 1 的名称为“智能卡读卡器 1”
- 读卡器 2 的名称为“智能卡读卡器 0”
并且该程序无法满足用户的需求。 我在 WinScard.dll 中使用 SCardGetStatusChange (需要读取器的名称)
该怎么办? 有没有办法更改读卡器的名称(固件、驱动程序...)? 可以使用读卡器的序列号吗?
我也看了,但没有结果 Smartcard reader naming: when removing any reader, the name of the rest changes How are PCSC smart card reader 'friendly names' constructed?
最佳答案
找到解决方案Getting PCSC reader serial number with WinSCard
序列号读取器
...
SCardConnect(hContext, readerName, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_UNDEFINED, ref hCard, ref protocol);
SCardGetAttrib(hCard, SCARD_ATTR_VENDOR_IFD_SERIAL_NO, receiveBuffer, ref receivebufferLen);
...
关于c# - 智能卡读卡器命名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24612817/