I dont mean the drive label.
Here's the beginning of a directory listing:
C:\>dir
Volume in drive C has no label.
Volume Serial Number is 9047-0567
The label and the serial number displayed here are both changeable by the
user and both are stored as "special" hidden filenames in the file
system. You can change both of these with special utilities that modify
the file directory directly (or there may be O/S utilities included...).
This serial number is NOT set in hardware.
The serial number was created in DOS to identify when a user had changed
a floppy disk, that is all. There was no intention of security in this.
I want to have it check the drive type
of "removalble drive" and also any unique ID on that hardware like a
serial number or something.
You do it in three steps then:
1) Somehow verify that the "removable device" is _your_ device and not
floppy or memory stick from another manufacturer.
2) Write a device driver-type of file that peeks into the memory
addresses (or sectors, etc...) to read the embedded serial number.
Windows will not let you do this natively (talking directly to devices or
memory addresses is a huge no-no) so you have to do some of what device
drivers do. This cannot be be done in a .NET language.
3) Create a .NET interface to talk to your non-.NET library that reads
the serial number from your device. This would be done along the lines
of how you call a Windows API function from .NET or how you call an
unmanaged C/C++ DLL from .NET.