I have two readers (HID OMNIKEY 5321) in system (every reader performs a different function)
In my program is set up that
but sometimes (without rebooting, perhaps lost contact)
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...)? Is it possible to use the serial number of the reader?
I also looked, but no result Smartcard reader naming: when removing any reader, the name of the rest changes How are PCSC smart card reader 'friendly names' constructed?
found a solution Getting PCSC reader serial number with WinSCard
serial number reader
...
SCardConnect(hContext, readerName, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_UNDEFINED, ref hCard, ref protocol);
SCardGetAttrib(hCard, SCARD_ATTR_VENDOR_IFD_SERIAL_NO, receiveBuffer, ref receivebufferLen);
...