Re: How to programmatically locate the storage device?



Thanks

The thing is we want to develop a software/hardware.
The hardware will be a USB mass storage device.

The software will have to find the drive and extract/store file for conversion.

About the:
> Of course then you have to correlate volumes with disks.
> Also note that there can be many USB storage devices connected to
> the system, so certainly you need more information than 'its a volume on
> a USB disk'. You need the unique identifier for a particular volume -
> and that should be the volume pathname returned from the SDK
> FindFirstVolume/FindNextVolume enumeration api. Given that information
> you really don't need anything else.

I am not sure if I grasp all the concept just yet. I'll have a look on the documentation and let you
know.



"Mark Roddy" <markr@xxxxxxxxxxxxxx> wrote in message news:%230AUYjmuFHA.3596@xxxxxxxxxxxxxxxxxxxxxxx
> Denis @ TheOffice wrote:
> > I need to locate an USB mass-storage device to store/retrieve files from.
> >
> > How to programmatically locate the storage device?
> >
> > I am basically looking for something like this
> > enum drive
> > Get drive info
> > if the one then break...
> >
> > What would be the function to enumerate drive and get it's info?
> >
> > Thanks
> >
> >
> >
> If you want to find a specific volume - FindFirstVolume/FindNextVolume
> in the SDK. If your want to enumerate all of the disk devices then use
> the SetupDi API (SetupDiGetClassDevsEx SetupDiEnumDeviceInfo
> SetupDiEnumDeviceInterfaces SetupDiGetDeviceInterfaceDetail) in the SDK.
>
> From a disk device handle you can use IOCTL_STORAGE_QUERY_PROPERTY to
> get the StorageAdapterProperty which in turn yields the
> STORAGE_ADAPTER_DESCRIPTOR which contains a BusType field that has a
> value of BusTypeUsb. Of course then you have to correlate volumes with
> disks. Also note that there can be many USB storage devices connected to
> the system, so certainly you need more information than 'its a volume on
> a USB disk'. You need the unique identifier for a particular volume -
> and that should be the volume pathname returned from the SDK
> FindFirstVolume/FindNextVolume enumeration api. Given that information
> you really don't need anything else.
>
>
> --
>
> =====================
> Mark Roddy DDK MVP
> Windows 2003/XP/2000 Consulting
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com


.



Relevant Pages

  • Re: USB Storage Device not functoning
    ... I'm having an almost identical problem with my HandySteno HC202 1 gig USB ... problem lies in the way Windows issues/reserves drive letters. ... I have an Easy Disk 512MB USB Storage Device which works absolutely fine on ...
    (microsoft.public.windowsxp.hardware)
  • Re:How to get the HardwareID which the logical drive locate
    ... is it possible to define which disk is removable? ... to decide how its USB storage device presents itself to the system. ... have multiple partitions or use autorun on removable disk. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: --++[Preventing the spread of USB malware]++--
    ... "/Flash_Disinfector will create a hidden folder named autorun.inf in each partition and every USB drive that is plugged in when you ran it. ... Don't delete this folder...it will help protect your drives from future ... > Malware uses two main techniques to spread through memory sticks. ... > the disk in a hex editor. ...
    (Pen-Test)
  • Re: Somewhat OT: Cant write files to a perfectly good CD
    ... emergencies and I also have the external USB hard disks to allow me to ... to floppy disk; I've lost three or four floppy disks' worth of data out ... My Fantom 200 GB hard disk wouldn't mount through an unpowered hub, ... Bottom line--not all USB drives are created equal, ...
    (misc.transport.road)
  • Re: Booting XP from external USB drive - change C drive?
    ... Of course putting the internal disk into a USB enclosure and the external ... What I mean was that on this laptop if you remove 2 screws you can ... Apart from the fact I bought the wrong disk and am not sure I can find a USB ... network drives or a USB attached disk to do this but it means planning it ...
    (microsoft.public.windowsxp.general)