Obtain Drive Letter from Physical Drive Number in VB6 Project

I am an experienced VB6 programmer who need some specialized help with a project. Your work will be a module, most of which I have done, that is part of a larger VB6y project.

Using GetObject("winmgmts:... I have obtained the firmware serial number of a USB flash drive plugged into a free USB port. I have attached a small simple project demonstrating this. It work perfectly and does NOT need to be modified. the code discovers all the physical hard drives including the USBSTOR type and enumerates them. I then determine which of them is a USB mass storage device as opposed to a hard disk drive and further refine the search to flash drives by virtue of their small capacity (less cylinders). Then I know of the drive array which is the flash drive. When I do, I get its firmware serial number.

Now, your part. I need the logical drive letter assigned to that USB flash drive (e:\, f:\, etc). Don't worry about the hard drives as they could be one physical drive with many partitions and hence numerous logical drive letters.I need only the drive letter of the USB drive that is filtered in the process (look at the code). I have left a label on the form for you to display the drive letter.

You will need a flash/thumb drive to test this. My example uses an 8gb, but you may modify the code to "see" any size USBSTOR device. This oce wil always be run from the system drive (c:\), so you may NOT simply use app.path. I may have missed a way in my current code to obtain the drive letter, I just don't know.

I do not want to use a third party .dll or ocx to get this info, I want you to use Windows API or pure code like I have to get this info. I ONLY want to use VB6 and not VBA or #C, just VB6. I know it's possible, I just don't know how. IOW, finish my simple project attached.

You should already know how to do this in order to bid this easy project. This is not a learn as you go project. I just need a few lines of code to finish this. I am easy to work with but time is of the essence. I am stuck in this project until I get past this. I require the code to be well commented, so I may learn. Thanks

REMEMBER: VB6 Project Attached

Taidot: Visual Basic

Näytä lisää: drive letter, determine usb drive letter vb6, obtain drive letter physical device, determine usb flash vb6, vb6 code drive letter, vb6 usb drive physical serial number, usb drive serial vb6, thanks you letter, thanks letter, pure storage, programmer vb6, letter of thanks, letter of, letter example, learn how to code for free, in vb6.0, i need a vba programmer, how to learn programmer, how to learn code for free, get programmer to look at your code, get help from a programmer, example of letter, example of a letter, example letter, drive to work

Tietoa työnantajasta:
( 59 arvostelua ) Taft, United States

Projektin tunnus: #4252761

Myönnetty käyttäjälle:


Consider my bid

$40 USD 1 päivässä
(2 Arvostelua)