C#
  Home arrow C# arrow Page 6 - 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 - Points of Interest


    (Page 6 of 6 )

    In this article we’ve learned a lot that could be used to use functions in native DLLs from the managed code. A few interesting points are:

    • This can be used in a number of ways, such as in the case of Windows hooks, where one needs to place the hook function in a Win32 DLL. That makes it difficult to implement hooks in a managed application, but this technique would allow us to do so without any problems.

    • The Default marshaller can interpret the data transferred during a Platform Invoke function call in a few/default ways. If we need the data to be interpreted differently, we may use the MarshalAs attribute to marshal that in the way we like. That’ll make a function behave the way we want it to.

    • Please note that this does not always work with all types, and the runtimes notify us at runtime by throwing an exception. Do use exception handling to ensure that your program handles the error conditions gracefully.

    Summary

    After this article we are a step near to developing our own Managed wrapper on the full WinSCard API that we can use to develop Smart Card enabled applications in .NET. In the next and concluding part of this series of article I shall show you how to do just that with the help of an extensive sample and full library code.


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