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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

930 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