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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prototype for MessageDlg in Embacadero XE 2 2 39
C++ assignment question 7 201
Getting IP address 8 81
gdb doesn't stop on breakpoint 2 69
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

831 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