.NET
  Home arrow .NET arrow Page 6 - Smart Cards in .NET, Part 3
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? 
.NET

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

    Table of Contents:
  • Smart Cards in .NET, Part 3
  • Two classes to rule them
  • Using the Library: The Demo
  • Smart card resource manager
  • CardCommand and SelectSmart
  • Source code for the library

  • 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 3 - Source code for the library


    (Page 6 of 6 )

    You can download the compiled library and source code for the demo using the library here. It contains the library, as a DLL, that we designed above, as well as the sample application that we can use to peek at how the library works. The library is written using VS .NET 2003 architect, and the library code and the demo application code are in C# and VB .NET respectively.

    The compiled library and the demo with source code come with no warranty of any kind. You’re free to use it in any way, but I’d appreciate it if you mail me if you find any bugs while using it, and use it in a Commercial, Freeware or Shareware application or product.

    Points of Interest

    The design of this library is not very fine, but it is more than enough for writing a full-fledged Smart Card application. You have unrestricted rights to use and distribute the compiled library as you wish, but I’d appreciate an email about the same, or maybe some code snippets. Feel free to contact me if you have any feature requests.

    The underlying WinSCard.dll itself complies with PC/SC v1.0, and the draft version of 2.0 is out on http://www.pcscworkgroup.com, so you may want to have a look at the new specification before you get the new implementations, just to have an idea of the shortcomings in the current implementation.

    Summary

    In this article we learned about writing a pure managed wrapper on the WinSCard API, and used it in a VB .NET application to communicate with a Smart Card. This can be a good starting point for writing a Smart Cards commercial library in .NET to many of you. I hope that it will get you started with writing applications that access and use smart cards in .NET. In case you have any doubts or confusion about the code, you may always write to me and I shall surely write back to you with an answer. Any comments and suggestions are also welcome.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Hi,I'm Digvijay .... the author of this article.Please do let me know how you...
       · Article looks very helpful. Will start looking and using them to suit our...
       · Hi,This is basically for managed code that is accessible from all .NET...
       · Hi, I am trying to access memory card (sle4428), as far as I know I need to use...
       · Hi,I jut provided the code to give an overview of how to go about it that is why...
       · Hi,This looks VERY useful. When can we expect the commercial library? I want to...
       · Hi ,You can expect that in March 2005 only.Regards,Digvijay
       · I am attempting to use the code provided and running into a little problem. I have...
       · Hi.In yur first article, what is the SCardLIB 1.0 component?In my Visual Basic...
       · Hi there,This code is quite interesting to me. It works great. Nice work. But I...
       · Hi, the library works fine in some readers, but with the next...
       · hi siri am Ramzy Ebiedi am using C#, ASP.Net VS2005i did test your...
       · Dear DigVijay,I would appreciate if you help me out....I'm developing an...
       · hi,I had this problem too, I tested my application with different cards,some...
       · Hi all,I'm very grateful to Mr. Digvijay for his article. Very interesting.I'm a...
       · Hi all, I'm very grateful to Mr. Digvijay for his article. Very interesting. I'm...
       · How to use your library to write a string like "hello word" and to read from the...
     

    .NET ARTICLES

    - Using CrystalReportViewer to Display Crystal...
    - Creating Summary .Net Crystal Reports
    - More on Commands, Input and the WPF
    - Grouping and Aggregating When Querying LINQ ...
    - Commands, Input and the WPF
    - Keyboard and Ink Input with WPF
    - Mouse Input and the WPF
    - Input with Windows Presentation Foundation
    - Introducing LINQ with XML and Databases
    - An Introduction to LINQ
    - Querying LINQ to SQL: Basics
    - Completing a Simple Storefront with LINQ
    - Knowing Your Environment: the System.Environ...
    - Creating the Home Page for a Simple Storefro...
    - LINQ Quickly with Language Integrated Queries





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