Solved

How do i read the  ATR & the serial number in it from a HID Proximity Card using PC/SC winscard.dll APIs

Posted on 2009-04-02
1
2,665 Views
Last Modified: 2012-06-21
I am trying to read the Serial Number of a HID proximity card using the 'winscard.dll' APIs.
I have obtained c# wrapper code which is capable of performing

- GetAllReaders
Wraps the PCSC function
             LONG SCardListReaders(SCARDCONTEXT hContext,
                        LPCTSTR mszGroups,
                        LPTSTR mszReaders,
                        LPDWORD pcchReaders
            );


- Connect to a active reader
Wraps the PCSC function
              LONG SCardConnect(
                        IN SCARDCONTEXT hContext,
                        IN LPCTSTR szReader,
                        IN DWORD dwShareMode,
                        IN DWORD dwPreferredProtocols,
                        OUT LPSCARDHANDLE phCard,
                        OUT LPDWORD pdwActiveProtocol
                  );

- Send APDU commands to the reader and process the response
Wraps the PCSC function
             LONG SCardTransmit(
                  SCARDHANDLE hCard,
                        LPCSCARD_I0_REQUEST pioSendPci,
                        LPCBYTE pbSendBuffer,
                        DWORD cbSendLength,
                        LPSCARD_IO_REQUEST pioRecvPci,
                        LPBYTE pbRecvBuffer,
                        LPDWORD pcbRecvLength
                  );

I am interested in knowing:
1) How to get the ATR
2) how to obtain the UNIQUE SERIAL NUMBER of the smart card
0
Comment
Question by:bhaskarvasudevan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
bhaskarvasudevan earned 0 total points
ID: 24106662
Found the solution by adopting the approach provided in the article
http://www.codeproject.com/KB/smart/smartcardapi.aspx
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question