问题描述
我正在使用PCSC-lite v1.6.4进行基于智能卡的应用程序开发.我需要一种方法,可以将智能卡从读取器中取出后立即进行检测,然后检测插入到读取器中的情况,以便智能卡将被迫再次完成特定的过程.
I am using PCSC-lite v1.6.4 for my smartcard based application development.I need a way to detect as soon as smart card is removed from reader and then to detect the insertion into reader so that smartcard will be forced to complete a specific process again.
如果可能,是否有任何基于中断/事件的方式而不是简单的轮询?
If possible, is there any interrupt/event based way instead of simple polling?
推荐答案
有 SCardGetStatusChange 在WinSCard库中.
There is SCardGetStatusChange in WinSCard library.
由于PCSC Lite是WinSCard库的重新实现,因此您也可以在PCSC Lite中使用它(此处).您可以找到几个示例.
Since PCSC Lite is a reimplementation of WinSCard library you can also use it in PCSC Lite (here). You can find several examples.
这篇关于使用C中的PCSC检测智能卡的移除和插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!