Click here to Skip to main content
14,937,037 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,
I need to read the contents of a SmartCard including photos and ID Number and Display in a Window. My problem is that all the solutions provided in internet are reading data from Credit, Debit and Sim Cards. My requirement is to read from SmartCard .

If you find this question as a duplicate please refer me to the right link. I request anyone to guide me to achieve my requirement.

What I have tried:

I have tried all the link and could read only my Debit/Credit card details.

GitHub - nicbedford/CardBrowser: Browse the contents of EMV smart cards using PCSC compliant hardware[^]
Updated 27-Aug-18 3:03am
Coder969 15-Apr-20 3:04am
Hi Kumar,

Are you able to get the APDU commands information for the CPR.If yes can you please share the information to me
KUMAR619 15-Apr-20 7:09am
Hi Coder969,
Earlier I faced the same issue which you faced. I tried all commands but could not expected results. Later I was provided with a driver and utility tool which displays data from card which is displayed in that utility software. Then I used the dll files from the executable folder of the utility. Then I referred in my project and created instance for those classed in the dlls. Then I got response from the card via card reader.
Coder969 15-Apr-20 7:13am
Hi Kumar,

Thanks for the response. The problem is I cannot use third party dlls in my application. Did you get any documentation for which APDU commands to use?
KUMAR619 15-Apr-20 7:21am
Sorry Coder969,
You are having a card right and the card reader. First contact the person who gave the card who will be having dll files. Don't treat as third party since you bought the card reader then you have the license to use that device. Hence the demo utility will have dll files in it. Reuse it. Can you provide me specification for both the card and Card reader

1 solution

A rather old article:
A Smart Card Framework for .NET[^]
and a more recent project:
GitHub - danm-de/pcsc-sharp: PC/SC wrapper classes for .NET, written in C#[^]

How to read the data from a specific card depends on the card type. You have to get the specifications and use the APDU commands described there.
KUMAR619 27-Aug-18 10:42am
Thanks for your link but Still I am unable to build the solution though I clicked Build Cmd but unable to Build the solution.
Moreover PCSC.Reactive is not Getting loaded onto solution. Please provide me solution to get rid of this problem.
Jochen Arndt 27-Aug-18 10:47am
The linksd are meant to show how it can be done. If you have problems, try at the source first; e.g. using the forum at the CP article.

Note that I don't have access to your system. So I can't help without knowing what you have tried (I did not even know which of the sources you are trying to use).
KUMAR619 29-Aug-18 6:07am
I'm using "Alcor Micro USB Smart Card Reader 0" for reading smart card. Can you help me to read the smartcard details. If required I'll share the code and show the response.
Jochen Arndt 29-Aug-18 6:13am
You have to get the specifications of the smart card. It does not care which reader is used.
KUMAR619 29-Aug-18 6:42am
Sorry to Say I don't know that specification but found image in another website. Please help me to get idea about that card.
Jochen Arndt 29-Aug-18 6:50am
You need that specification if it is not a standard storage card (which can be used as any other drive once mounted by the operating system).

A smart card is accessed using ADPU commands. The libraries from my solution provide functions to send such commands and receive. But you have to know the ADPU command set used by your specific card.

I can't help with that because I don't know your card.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900