differentiate between IDE hard disk n removable hard disk

Hi,

I have developed a disk filter driver.
It is an upperfilter.
I want to use this filter driver to differentiate between a IDE hard disk
and a removable hard disk such as USB hard disk or PCMCIA hard disk.
How can I do that?

I have checked that the characteristics for the deviceobject for both is the
same which is 0x100
And using IOGetDeviceProperty API, with DevicePropertyEnumeratorName
property, I got IDE for both IDE hard disk and PCMCIA hard disk but USBSTOR
for USB hard disk.
Why I got the same result for PCMCIA hard disk and normal IDE hard disk?
How can I identify them accurately?

I also notice that removable hard disk has POWER_PAGEABLE bit set in the
deviceobject flag but not the IDE hard disk.
Is this always true for all hard disk?

Hope someone can enlighten me on this.

Thank You very much.

cheers,
vincent


Send a fun phone greeting to your friend!
http://www.msn.com.sg/mobile/fungreetings/

send IOCTL_STORAGE_QUERY_PROPERTIES to get the AdapterProperties of the
device. It contains the type of bus the adapter driver says it’s
connected to.

see the DDK documentation for STORAGE_ADAPTER_DESCRIPTOR and it’s
BusType field. The documented values are:

BusType
Specifies the type of bus to which the device is connected. BusType can
be one of the following: BusTypeScsi, BusTypeAtapi, BusTypeAta,
BusType1394, BusTypeSsa, BusTypeFibre, BusTypeUsb, or BusTypeUnknown for
a type of bus not listed.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of vincent gambit
Sent: Friday, June 13, 2003 10:11 AM
To: NT Developers Interest List
Subject: [ntdev] differentiate between IDE hard disk n removable hard
disk

Hi,

I have developed a disk filter driver.
It is an upperfilter.
I want to use this filter driver to differentiate between a IDE hard
disk and a removable hard disk such as USB hard disk or PCMCIA hard
disk.
How can I do that?

I have checked that the characteristics for the deviceobject for both is
the same which is 0x100 And using IOGetDeviceProperty API, with
DevicePropertyEnumeratorName property, I got IDE for both IDE hard disk
and PCMCIA hard disk but USBSTOR for USB hard disk.
Why I got the same result for PCMCIA hard disk and normal IDE hard disk?
How can I identify them accurately?

I also notice that removable hard disk has POWER_PAGEABLE bit set in the
deviceobject flag but not the IDE hard disk.
Is this always true for all hard disk?

Hope someone can enlighten me on this.

Thank You very much.

cheers,
vincent


Send a fun phone greeting to your friend!
http://www.msn.com.sg/mobile/fungreetings/


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com