C#
  Home arrow C# arrow Page 5 - Smart Cards in .NET, Part 2
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

Smart Cards in .NET, Part 2
By: Digvijay Chauhan
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 32
    2004-11-08

    Table of Contents:
  • Smart Cards in .NET, Part 2
  • The Basics
  • Two Versions
  • The Managed Smart Card Sample
  • Our Interface
  • Points of Interest

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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:

    Smart Cards in .NET Part 2

    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.

    More C# Articles
    More By Digvijay Chauhan


       · Hi I'm Digvijay . the author of this article.Please feel free to ask any questions...
       · Dig, I really enjoyed the article. Please keep up the great work!:)
       · awesome! u rok!
       · Hi. Your code won't work if you have more readers connected to one pc. I have...
       · hi,your article was excellent,but u did not provide any code for accessing data...
       · hi i read your article, its very nice.. but there are no code to connect and read...
       · Hi Thiru,Sorry but right now i am away from work in Sweden doing my Masters in...
       · Thanks :-)
       · Hi,Thanks for the fix ... it'll help several people.Regards,DIgvijay
       · hi thanks alot for this lesson.i have some questions please : **** i am...
       · hye.. i already read your article.. it great. its give me an overviw abiut smart...
       · to which file should i paste the following code// WinSCard API's to be...
       · you do the attendance system using smart card ?? so have yuo sucessfully done it??...
       · hi digvijay, sir i want to know a few details about smart cards...i...
       · Hi,Yes i did this about two years ago but right now i am quite busy with my...
       · Hi DigVijay, I read your article, it nice, but i am new to MFC, I have to...
     

    C# ARTICLES

    - C# and XML
    - Pointers and Arrays in C#
    - C# 3.0 Extension Methods
    - Overloading Operators in C#
    - Iterators and Nullable Types
    - Patterns and Iterators in C#
    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#
    - Working with Regular Expressions in C#
    - Sending Simple E-Mail in C#
    - Building C# Comparable Objects: IComparable ...
    - Color Transformation Applications in C# GDI+...
    - Performing Color Transformation Operations i...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT