SCardListReaders suddenly not working

SCardListReaders is suddenly (?) not returning any readers on ANY of my
systems, even when the Microsoft USBCCID.SYS driver is running the reader.
It’s returning SCARD_E_NO_READERS_AVAILABLE. (Of course, I’ve verified that
SCARDSVR is running.) There was a long exchange about this same problem a
year ago or so on an MSDN support forum, but it doesn’t seem to me that it
ever got resolved.

The only common denominator amongst my XP, Vista Home 32, and Vista Ultimate
64 & 32 systems is that I’ve run IFDTEST on them. That never used to impact
SCARDSVR’s ability to report readers correctly.

Walter Oney
Consulting and Training
www.oneysoft.com

IIRC from a long time ago, running IFDTEST requires that the SmartCard
Manager be disabled. When it is disabled, you cannot open a smartcard from
user mode since it was opening the device with exclusive access.

“Walter Oney” wrote in message news:xxxxx@ntdev…
> SCardListReaders is suddenly (?) not returning any readers on ANY of my
> systems, even when the Microsoft USBCCID.SYS driver is running the reader.
> It’s returning SCARD_E_NO_READERS_AVAILABLE. (Of course, I’ve verified
> that
> SCARDSVR is running.) There was a long exchange about this same problem a
> year ago or so on an MSDN support forum, but it doesn’t seem to me that it
> ever got resolved.
>
> The only common denominator amongst my XP, Vista Home 32, and Vista
> Ultimate
> 64 & 32 systems is that I’ve run IFDTEST on them. That never used to
> impact
> SCARDSVR’s ability to report readers correctly.
>
> Walter Oney
> Consulting and Training
> www.oneysoft.com
>
>

Yes, IFDTEST is run with Smartcard service disabled.
I have never heard of any problem with scardlistreaders though before.

%#$#@! I said that I made sure SCARDSVR was running before attempting SCardListReaders. Had I not done so, SCardEstablishContext would have failed. My question is not about IFDTEST, it’s about the resource manager.

I’ve solved my immediate problem. The system log showed error messages from SCARDSVR complaining that it was getting ERROR_ACCESS_DENIED when trying to open my reader. Sure enough, the default ACL for the PDO lacked any entry for LOCAL_SERVICE. I can fix that for my own drivers by making the appropriate call to IoCreateDeviceSecure.

But this solution invites the larger questions of why the standard USBCCID driver fails, why the WDK sample driver doesn’t mention this problem, and how legacy SmartCard drivers are supposed to work.