Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Apr : Enumeration of USB flash drives?

www.cryer.info
Managed Newsgroup Archive

Enumeration of USB flash drives?

Subject:Enumeration of USB flash drives?
Posted by:"Bo Berglund" (bo.berglu..@system3r.se)
Date:Wed, 09 Apr 2008 15:45:41 +0200

I am writing an application that writes data to a removable USB drive.
The data are parameters for configuring automation equipment and are
supposed to be stored on a USB flash drive then delivered with the
equipment.

What I want to do is to find the USB drive amongst the drives already
mapped on the PC used in production. They usually have  a number of
network shares as drive letters for instance. The PC may also have
more than one internal drive. THe flash drive registers with different
letters on different PC:s so I cannot use that as a que.

So what I want is a way to enumerate *only* the inserted USB flash
drives to limit the selection for data storage to only one or two
drives. As part of the data storage I will also force the Volume label
of the drive to the serial number of the equipment it belongs to, so
it is important not to do this on anything but the USB drive.

I have looked around and googled quite a bit but found only very
complex schemes to find USB drives for example by requesting Windows
notification on drive discovery etc....

Is it at all possible to do this with Delphi (currently using Delphi
7)??


Bo Berglund

Info

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive