How to work with a smart card

My project I am working on a small program that should set an alarm if the user locks the computer without removing the smart card from the computer.

I am using C # with WPF and .Net 4.0, and my smart card is version V4.2C

My problem . I have every opportunity to work, but I just don’t know how to determine if there is a smart card in the Smart Card Reader.

I tried to do a google search but with no result, so I hope some of you can help me.

+4
source share
4 answers
+2
source

Usually you want to use the PC / SC infrastructure to talk to the smart card, but it can be quite some work to implement from scratch yourself.

I would recommend to look into some existing project and get some ideas from there, as there are many projects that implement PC / SC in .NET.

Take this from CodeProject , for example.

+3
source

Take a look at http://code.google.com/p/pcsc-sharp/

Works well for me on 32-bit and 64-bit platforms, and also supports mono.

+1
source

In addition to using PC / SC to detect the presence of a card, from your description, which does not seem very reliable if the presence of the card in the reader is the only condition (un?) For locking the PC without alarm, if you do not periodically scan the card for some randomly generated data or Is there any similar process that ensures that the card is missing, since the card can generate the correct random sequence?

0
source

All Articles