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,508 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
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now