与许多读者沟通(智能卡) [英] Communicating with many readers (smart card)
问题描述
你好,
我是智能卡世界的初学者,希望有人在这里获得更多经验可以帮助我解决一些问题我有疑问。
我有一张Mifare卡和一个omnikey读卡器。
我知道存在用于与智能通信的Win 32 API br />
卡,功能如下: SCardEstablishContext
等
我感兴趣,我写了一个Hello World程序,它使用上面的API与我的智能卡对话(我也使用这个文件:
http://www.hidglobal.com/sites/hidglobal.com/files/omnikey_contactless_developer_guide.pdf [ ^ ]),确实
这个意味着我的程序只能使用omnikey读卡器与智能卡通信?或其他读者呢?
Hello,
I am beginner in smart card world and hope someone here with
more experience will help me shed light on some doubts I have.
I have a Mifare card and a omnikey reader.
I know there exists Win 32 API for communicating with smart
card, with functions like: SCardEstablishContext
, etc.
I am interested, say I write a Hello World program which
talks to my smart cards using above API (I also use this document:
http://www.hidglobal.com/sites/hidglobal.com/files/omnikey_contactless_developer_guide.pdf[^]), does
this mean my program will be able to talk to smart cards using ONLY using omnikey readers? Or other readers also?
推荐答案
您应该能够将代码用于任何符合SmartCard标准的阅读器,这些标准最多(如果不是全部) 。只需调用SCardListReaders即可获得插入PC的读卡器列表。使用数据的NULL参数调用一次(获取长度),然后根据该长度分配数据存储区域,并使用此数据存储作为参数再次调用SCardListReaders。使用其中一个名称来调用SCardConnect。
You should be able to use the code with any reader that complies with the SmartCard standards, which is most (if not all of them). Just call SCardListReaders to get a list of readers that are plugged into the PC. Call it once with a NULL parameter for the data (to get the length), then allocate a data storage area based on that length and call SCardListReaders again with this data store as a parameter. Use one of the names returned to call SCardConnect.
这篇关于与许多读者沟通(智能卡)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!