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
You should be using:
lReturn = SCardConnect(hResManager,szAvailRdr,SCARD_SHARE_SHARED,SCARD_PROTOCOL_T1,
&hCardHandle,
&dwActProtocol);
Instead, try using:
lReturn = SCardConnect(hResManager,szAvailRdr,SCARD_SHARE_DIRECT,
NULL,
&hCardHandle,
NULL);
where szAvailRdr
refers to the reader name (smartcard readername) and hCardHandle
is a handle obtained before using scardconnect
.
This should keep you going!