nothingam
nothingam

Reputation: 175

List only local SmartCard readers

I've been struggling to find a way for listing only locally available SmartCard readers. Or at least differentiate between local readers and readers shared via RDP session.

I'm using SCardListReaders, but that lists all readers registered into the SmartCard subsystem, including readers from RDP shares. Are there any way to filter that list?

One way would be to list physical reader devices with SetupDiGetClassDevs, then use SCardListReadersWithDeviceInstanceId. But i need to have Windows 7 support and SCardListReadersWithDeviceInstanceId was introduced from Windows 8.

Any alternative solution is also appreciated.

Upvotes: 2

Views: 403

Answers (1)

Alexander
Alexander

Reputation: 1341

You can use the SCARD_SCOPE_SYSTEM constant for dwScope parameter when calling SCardEstablishContext

Remote SmartCard readers can only exists inside of user context.

Upvotes: 0

Related Questions