How to get Disk Number from Drive letter

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I want to get Disk number from the drive letter. Suppose if i have 2 hard disks attact to my system and frist have partition C: and D: and second have E: then i want that by giving C: it should return Disk 0 and by giving D: it would return Disk 1. As in Device managment for Window 2000 and later we can clearly see the hard disk numbers as Disk 0 and disk 1 so as CD Rom numbers.
Can anyone help me in this regard?

View the full article
 
Back
Top