[Pcsclite-muscle] PCSC proxy mode and READER_STATE struct
Andrey Af
public.irkutsk at gmail.com
Fri Oct 27 01:34:50 PDT 2023
Hi all, I use the pcsc-lite-1.8.24 API.
So, PCSC API call to SCardGetStatusChange does the conversion from
READER_STATE to CARDREADER_STATE.
But I have an internal myScardGetStatusChange call and I get a ready
SCARD READER_STATE.
How do I do the reverse conversion, from SCARD_READER_STATE to
READER_STATE, so that SCardGetStatusChange is working?
I have variables dwCurrentState, dwEventState and need to get
readerState variable.
Sample code what am I doing:
(dwCurrentState, dwEventState, rgbAtr[]) = myGetStatusChange(hContext,
dwTimeout, readerName, dwCurrentState, dwEventState, rgbAtr[]);
if(dwEventState & ReaderStateChanged)
{
READER_STATE[x].readerState = dwEventState & ReaderStatePresent ?
CardReaderStatePresent : CardReaderStateAbsent;
}
And returned READER_STATE[] from unix socket, for CMD_GET_READERS_STATE.
When scanning, I get the token information, and then after a while -
"Card state: Card removed"
More information about the pcsclite-muscle
mailing list