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. |
|
| · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | | |
|