Getting PCSC reader serial number with WinSCard
Maybe i'm a bit late - but anyway...
You can connect directly to the card reader using the SCARD_SHARE_DIRECT flag with SCardConnect. At least with us this works fine.. (we use a protocol flag of "0x00")
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!