智能卡读卡器命名:移除任何读卡器时,其余读卡器的名称会发生变化
我正在编写一个智能卡应用程序。该应用程序将卡连接到读卡器中,有时可以与其一起使用。我需要观察读卡器何时不再可用(卡被弹出或读卡器从 USB 中移除)。
使用 SCardStatusChange< 来观看读者/a>.此功能需要读者姓名才能观看。
我将两个带卡的读卡器插入 USB 插槽。它们被识别为“USB 智能卡读卡器 0”和“USB 智能卡读卡器 1”。我删除了一名读者。 Windows 表示“USB 智能卡读卡器 1”仍处于连接状态。我插入它 - 两者都可用。现在我删除第二个。 Windows 仍然显示“USB 智能卡读卡器 1”已连接。这就是问题所在,因为它应该是仍然连接的“USB 智能卡读卡器 0”。跟踪例程无法监视阅读器,因为它的名称已更改。
是驱动程序问题还是 XP 智能卡子系统问题?使用的驱动程序是 USB CCID 兼容版本 5.2.3790.1830(VID 076B,PID A021),usbccid.sys。
I am writting a smartcard application. This application connects card in reader and sometimes works with it. I need to watch when reader is no longer available (either card is ejected or reader is removed from USB).
Readers are watched using SCardStatusChange. This function requires reader name to watch.
I insert two readers with cards into USB slots. They are recognized as "USB Smart Card Reader 0" and "USB Smart Card Reader 1". I remove one reader. Windows says, "USB Smart Card Reader 1" is still connected. I insert it - again both available. Now I remove the second one. Windows still says "USB Smart Card Reader 1" is connected. And this is the problem because it should be "USB Smart Card Reader 0" which is still connected. Tracking routine can't watch reader because it's name is changed.
Is it a driver problem or XP smartcard subsystem problem? Driver used is USB CCID Compliant version 5.2.3790.1830 (VID 076B, PID A021), usbccid.sys.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们在一个项目中遇到了这个问题,并通过迭代每个可用的读卡器并检查该读卡器中是否插入了卡来解决该问题。您在使用多个品牌的 USB 读卡器时都会遇到这个命名问题。
我公司有一款产品可以让您将智能卡与网站集成;我们的演示之一列出了当前可用的智能卡读卡器,它可能会帮助您测试不同的读卡器场景:https://cardboss.cometway.com/content.agent?page_name=GetReaders+Demo
We ran into this problem on a project and handled it by iterating through each available reader and checking to see if a card is inserted in that reader. You will encounter this naming problem with several brands of usb readers.
My company has a product that lets you integrate smart cards with websites; one of our demos lists the smart card readers currently available and it might help you with testing different reader scenarios: https://cardboss.cometway.com/content.agent?page_name=GetReaders+Demo