Re: How to programmatically locate the storage device?
- From: "Denis @ TheOffice" <denisco@xxxxxxx>
- Date: Fri, 16 Sep 2005 09:10:00 -0400
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
.
- References:
- How to programmatically locate the storage device?
- From: Denis @ TheOffice
- Re: How to programmatically locate the storage device?
- From: Mark Roddy
- How to programmatically locate the storage device?
- Prev by Date: Finding USB Port No to which Device is attached From Function Driver
- Next by Date: Re: IRP_MN_QUERY_DEVICE_RELATIONS and verifier
- Previous by thread: Re: How to programmatically locate the storage device?
- Next by thread: Is there protocol enumerations in NDIS.sys?
- Index(es):
Relevant Pages
|