Good day, In this post I would like to present you an idea which came to my mind the other day. I was thinking of a cool and convenient way for an authentication system which does not require typing anything into an entry field. Getting to the point: I thought about using a USB device, USB storage / flash drive or mobile phone etc. as the key for an authentication system. This means whenever you have to authenticate in a system all you need to do is plugging in your USB device. The authentication system will scan it and determine whether it is white listed as a valid key for the authentication or not.
So I decided to go on researches on the internet to find out how I will be able to access the USB devices of my Windows 7 Computer and how I will be able to determine its current state, means knowing if it is plugged in at the current moment or not.
I found out I could use
Marshal, which is a class located in the
System.Runtime.InteropServices of .NET 4.0 Namespace to achieve this. A short bit later I was able to find a public class which would let me do exactly what I need. I decided not to reinvent wheels and use the public class I have found on CodeProject.
Here is a preview of what I have achieved at the end