Smart Cards in .NET, Part 2 - Our Interface
(Page 5 of 6 )
Next we use these API’s to find all the readers attached to the system on which we run this application. The application presents an interface as below:

Figure 2 GUI of the Demo application
The comments in the demo code are pretty descriptive and will explain the flow of the program. First we use the SCardEstablishContext API to acquire a context handle from the resource manager, and then call the SCardListReaderGroups to find all the reader groups on the system. We next find all the readers in the first group using the SCardListReaders API to find all the system readers. For each found reader a message is displayed and is added to the list box. I have a ACS30 USB reader connected and that is listed in the UI above.
You may play with this code, changing the code here and there just to see how the code behaves, and soon you’ll be able to make any calls that you want into the unmanaged DLL world.
Next: Points of Interest >>
More C# Articles
More By Digvijay Chauhan
|
| · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | | |
|