winscard

Get mifare card serial number with WinSCard library

旧城冷巷雨未停 提交于 2019-12-04 16:25:50
I am working on an application that required reading the mifare card serial number, the language I am working with is C#. I am new to mifare reader programming, so I am sorry for asking dumb question. At first I would like to know if there is a different between Mifare UID and Mifare Serial number. I have managed to get UID with the help of WinSCard library, but I cant figure it out how to get the card serial number which should be 10 digit numbers. I do appreciate if you could point me to the right direction. Thanks in advance for the help. Regards C# signature of SCardTransmit method

Smart card reader development with .Net technologies

心已入冬 提交于 2019-12-04 11:35:13
问题 Does anyone know how to monitor the presence of smart card and read the UID value of the card? Yes I tried lot of examples in web like A Smart Card Framework for .NET pcsc-sharp Monitoring a Smartcard Reader But No idea how to do it. I can detect the presence of a card and can get the UID separately, but no idea how to combine them in my application:( . Help me 回答1: I figure it out. thought to share with anyone interested. I used winscard.dll functions to access card data and communicate with

Smartcard reader naming

无人久伴 提交于 2019-12-03 22:15:59
I have two readers (HID OMNIKEY 5321) in system (every reader performs a different function) reader 1 - "Smart Card Reader 0 " reader 2 - "Smart Card Reader 1 " In my program is set up that "Smart Card Reader 0 " - action 1 "Smart Card Reader 1 " - action 2 but sometimes (without rebooting, perhaps lost contact) reader 1 gets name "Smart Card Reader 1 " reader 2 gets name "Smart Card Reader 0 " 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..

Getting PCSC reader serial number with WinSCard

≯℡__Kan透↙ 提交于 2019-12-01 04:31:40
I have a problem with getting PCSC reader serial number if card is not present in the reader. I am using winscard.dll and c++. The following code will work only for the case if card is present in the reader. Otherwise the SCardHandle is not retrieved. I haven't found any other way to get SCardHandle. SCARDHANDLE hCardHandle; SCARDCONTEXT hSC; WCHAR pCardReaderName[256]; LONG lReturn; lReturn = SCardEstablishContext(SCARD_SCOPE_USER, 0, 0, &hSC); if (lReturn != SCARD_S_SUCCESS) { Console::WriteLine("SCardEstablishContext() failed\n"); return; } my_select_reader(hSC, pCardReaderName); // just

Getting PCSC reader serial number with WinSCard

纵饮孤独 提交于 2019-12-01 02:54:29
问题 I have a problem with getting PCSC reader serial number if card is not present in the reader. I am using winscard.dll and c++. The following code will work only for the case if card is present in the reader. Otherwise the SCardHandle is not retrieved. I haven't found any other way to get SCardHandle. SCARDHANDLE hCardHandle; SCARDCONTEXT hSC; WCHAR pCardReaderName[256]; LONG lReturn; lReturn = SCardEstablishContext(SCARD_SCOPE_USER, 0, 0, &hSC); if (lReturn != SCARD_S_SUCCESS) { Console:

How to find the device instance id of a PCSC reader

房东的猫 提交于 2019-11-30 17:31:18
问题 Having only a handle and context to a PCSC reader using winscard on Windows >= XP, is there some way to get its device instance id or something else that can be used in the SetupDi* API to find out which driver is loaded for said reader. SCardGetReaderDeviceInstanceId is only available on Windows 8, so unfortunately not for me. As a plan B, all smart card readers could be enumerated in SetupDi using the smart card reader class guid. But then I would need a unique attribute to be able to

Contact-less card through an OmniKey, how to get “UID”?

给你一囗甜甜゛ 提交于 2019-11-30 04:15:30
I am trying to read information off of a smartcard, using a contact-less OmniKey 5321 card reader. Edit : Added a bounty. I'm writing a C# 3 in .NET 3.5 program, so this is a Windows application. The card has some information stamped onto it, that I would assume, in some way, is present in the card data (there is a photo of the card and reader below.) The card has the following information stamped onto it: 1* 00447 21091328-32 When using the Diagnostics application that comes with the OmniKey card reader, I get the following information: Smart Card Name: iCLASS 16KS UID:EE 74 0E 00 FB FF 12 E0

How are PCSC smart card reader 'friendly names' constructed?

醉酒当歌 提交于 2019-11-29 17:08:20
I use WinSCard to list all readers, which gives me a list like this: ASK RDR4x7 0 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 0 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 1 SCM Microsystems Inc. SCR3320 USB Smart Card Reader 2 Which is great, but I have no clue which name belongs to which card reader. Where do these names come from? How are they constructed? What I've found up until now: in the registry, there is a HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services key. Under this key, you can find the subkey which matches the card reader's "service" (which I found by